Is there any way for displaying a widget when a button is clicked ? But not as a pop up with template = true and slotId = cockpitWidgetChildrenInvisible like in this example :
<widget-extension widgetId="mainSlot">
<widget id="paragraphsPopup" widgetDefinitionId="com.training.backoffice.widgets.paragraphspopup"
slotId="cockpitWidgetChildrenInvisible" template="true">
<setting key="_width" type="String">500px</setting>
<setting key="_height" type="String">auto</setting>
<instance-settings>
// instance settings here for close / init / select.
</instance-settings>
<virtual-sockets/>
</widget>
</widget-extension>
I want the widget to be invisible in a Default Portal Widget maybe in the children slot and when I press a button the widget becomes visible. (Again : NOT as a pop-up widget)
Related
I create an Entry on Xamarin.Forms using the following code
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
The text that should appear is "32" but the entry appears empty on UWP app until I click the entry,
this happen only on Windows, on Mac, Android, iOs, the entry shows the text normally since it appears.
Entry Before Clicking
Entry After Clicking
I add Entry by code behind, but I don't have any issue in Android and UWP.
Firstly, set current cpntentpage stacklayout name as stacklayout1.
<StackLayout x:Name="stacklayout1">
<!-- Place new controls here -->
<Label Text="Welcome to Xamarin.Forms!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</StackLayout>
Then add Entry in Stacklayout.
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
stacklayout1.Children.Add(txtMeasures);
Seems to be a known issue with Entries on UWP:
Text is not visible on Entry element after animation finished #8503
Entry text initially invisible on UWP #8787
Fix 8503, 8787 - text in Entry not immediately visible, or visible after IsVisible set to true #8536
There are a couple of work arounds (set request height on the entry or where its wrapped in a scrollview have that wrap a ContentPresenter). I'm having this issue related to a scrollView but can't get either workaround to work 🤷♂️
In Delphi I got used to pressing F12 whenever my program becomes irresponsive to see what the Main thread is doing, mainly for stack trace but sometimes also local vars.
Now I am playing around with SharpDevelop and can't see anything quite like that. Is it possible at all?
There is not pre-defined keyboard shortcut in SharpDevelop for debug break. It is available from the Debug menu by selecting Debug - Break. You can also press the pause button in the main toolbar.
If you want a keyboard shortcut then you would need to edit the ICSharpCode.SharpDevelop.addin file and add a shortcut to the Break menu. Below shows the Break menu item, without a keyboard shortcut, and the Continue menu item which has F5 as its shortcut.
<Condition name="DebuggerSupports" debuggersupports = "ExecutionControl">
<MenuItem id = "ExecutionControlSeparator" type = "Separator" />
<Condition name="IsProcessRunning" isprocessrunning = "True" isdebugging = "True" action = "Disable">
<MenuItem id = "Break"
label = "${res:XML.MainMenu.DebugMenu.Break}"
icon = "Icons.16x16.Debug.Break"
class = "ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand"/>
</Condition>
<Condition name="IsProcessRunning" isprocessrunning = "False" isdebugging = "True" action = "Disable">
<MenuItem id = "Continue"
label = "${res:XML.MainMenu.DebugMenu.Continue}"
icon = "Icons.16x16.Debug.Continue"
shortcut = "F5"
class = "ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand"/>
</Condition>
</Condition>
So you can add a new shortcut attribute for the Break menu item if you want to by editing the ICSharpCode.SharpDevelop.addin file.
I am now getting my tabs in the Application Layout's TitleBar form a view, but it seems that managing the "selected" property is not wotking. Here is the code I have in my page:
<xe:this.titleBarTabs>
<xe:repeatTreeNode indexVar="1" var="tab">
<xe:this.children>
<xe:basicLeafNode label="# {tab.label}"
submitValue="#{tab.label}"
onClick="#{javascript:sessionScope.selectedTab = tab.label;}">
<xe:this.href><![CDATA[#{javascript:
"home.xsp?action=openDocument&documentId=" + tab.unid;}]]>
</xe:this.href>
<xe:this.selected>
<![CDATA[#{javascript:tab.label==sessionScope.selectedTab;}]]>
</xe:this.selected>
</xe:basicLeafNode>
</xe:this.children>
<xe:this.value><![CDATA[#{javascript:getTabs();}]]></xe:this.value>
</xe:repeatTreeNode>
</xe:this.titleBarTabs>
Can this be that hte Href and onClick cannot be there at the same time or I'm just missing something?
As usual, thanks a million for your help. Can't wait to give some back...
You have to decide what shall happen when user clicks a title bar tab:
open URL defined in href
OR
execute onClick event.
The help for onClick gives the hint:
So, you can't use onClick and a scope variable to appear a tab selected after user clicked on tab and new content shows up.
To accomplish this
add an URL parameter &tab= with the tab label tab.label to your href URL
return true in selected code if the current tab label is equal to the tab URL parameter
Your href and selected properties would look like this then:
<xe:this.href><![CDATA[#{javascript:
"home.xsp?action=openDocument&documentId=" + tab.unid + "&tab=" + tab.label}]]>
</xe:this.href>
<xe:this.selected>
<![CDATA[#{javascript:tab.label === param.tab}]]>
</xe:this.selected>
Don't forget to delete the onClick property in your code. You don't need it anymore.
Along the lines of what Knut is suggesting (I think) ... comment out the onClick property for the basicLeafNode and moves its function to the onItemClick for the xe:applicationLayout control.
The code for the onItemClick would be something like this...
var clickedTab = context.getSubmittedValue();
sessionScope.selectedTab = clickedTab;
My InstallUISequence looks as below in Orca:
CostFinalize->Dialog1->CA1->Dialog2->CA2->MaintenanceWelcomeDlg
Dialog1 has two radio buttons (rb1 and rb2):
- rb1 should show Dialog 3 after Dialog1 without going through CA1->Dialog2->CA2 and then show MaintenanceWelcomeDlg
- rb2 follows the InstallUISequence defined above and shows Dialog 4 before MaintenanceWelcomeDlg
However when I select rb1 this is what happens:
Dialog1->Dialog3->Dialog2
How can I prevent Dialog2 from being called when rb1 is selected?
NOTE: Dialog3 and Dialog4 are not on the InstallUISequence. They are only called using NewDialog from Next buttons.
Solved the problem by adding a condition to the CA1, Dialog2 and CA2.
<Custom Action="CA1" After="Dialog1">
<![CDATA[rb_Prop = "valueX"]]>
</Custom>
<Show Dialog="Dialog2" After="CA1">
<![CDATA[rb_Prop = "valueX"]]>
</Show>
<Custom Action="CA2" After="Dialog2">
<![CDATA[rb_Prop = "valueX"]]>
</Custom>
I have a TextField form inside a window. Created with UiBinding. Next to the TextField is a button. I wanted to know if it was possible to create a new TextField widget when that button was pressed using UiBinder?
This is what I have:
Window class:
#UiField
TextField text;
#UiField
HorizontalPanel hPanel;
....
#UiHandler("addText")
public void onClick(SelectEvent event){
hPanel.add(text);
}
My UiBinder file:
<gxt:Window ...(generic setup)...>
<g:VerticalPanel>
<gxt:FramedPanel>
<container:VericalLayoutContainer>
<container:child>
<g:HorizontalPanel ui:field="hPanel">
<form:FieldLabel text="Text">
<form:Widget>
<form:TextField ui:field="text"/>
</form:Widget>
</form:FieldLabel>
<button:TextButton ui:field="addText"/>
</g:HorizontalPanel>
</container:child>
</container:VericalLayoutContainer>
</gxt:FramedPanel>
</g:VerticalPanel>
</gxt:Window>
When I click the button it all it does is move the button from the right side of the text field to the left. I have more textfields in the window so I played around to see what it was really doing. It's taking that field and just moving it next to the button.
Is there a way I can create a new TextField underneath the original?
Probably LazyDomElement will help you.