In RCPTT, how do you verify the state of a SWT.CHECK menu item? - checkbox

I have an Eclipse based application that has a context menu with items that when clicked on once cause the menu to disappear. If the menu is opened again those items are checked (their style is SWT.CHECK). If clicked on again they are unchecked. In RCPTT there's no way to enter Assertion Mode without the context menu disappearing so I need to write the ECL code manually. So what I'm doing is I click on the item and it generates the following ECL code:
get-menu -path "someCascadeMenuItem/someSelectableLeafItem" | click
Instead of that "click" I need to verify the state of the menu-item. My question is how do I verify if that leaf item is checked or unchecked? I wasn't able to find any command for this.

Related

Template for Button with an appended toggleButton (ToggleButton shows context menu on clicking)

How to make a control which has both button and togglebutton/Combobox? on clicking the toggle button i should be able fire a command depends on the selection.
1. I want some templates to achieve this (i.e. On clicking left side of the control, i have to fire Open command and on selecting right side of the control it should open other options ).
2. Also, is there any way to achieve such that i just have to provide various items like "Open", "Show previous versions" and the button takes the first item (in this case "Open")

GtkNotebook: Appending to the Default Popup Menu

Is there a way to append a menu item to the popup menu that appears by default on right-clicking a GtkNotebook's tab (the one that contains the names of all the open tabs)?
As a somewhat gross hack, it might be possible to use gtk_notebook_get_menu_label() to get the GtkLabel in one of the tab's menu items on that menu, and then use parent-walking from there to find the menu.
Possibly this only works when the menu is being realized/shown, you could try adding event handlers on that label to detect that.
On the other hand, user4815162342's suggestion of re-implementing the menu is way easier.
Looking at the source code, it would appear that there is no way to append to the existing menu: the menu is kept in a private structure, and it is popped up directly on button-press event.
You can disable the default menu, connect to button-press event, and popup your own menu.

Sencha Touch - Nested List - Refreshing a list item. (Using getItemTextTpl to se Template )

I have a nested list with a template by using getItemTextTpl. Template is simple it checks for a flag and if true it shows a button on a list item. If false show no button.
When on the list item I press the button (It's a delete button) I want to refresh that list item to not show the button. To make the button change I have to navigate up two levels and back down for it to update the list item.
My problem is getting the list item to refresh/Update. Can force the template to check the list item again etc? I can get the button to fire the event.
Thanks!
for the display layer:
why not just use css to apply/change the class of the delete button to hide it? then you don't have to refesh anything.
then you can programically set the value in your code, or send to the server to make sure the status is set when the view reloads at another point.

Keep menu open after selecting a item

I need my menu (opened by a menubutton) to stay open after you select an item from the menu. So that you can select more then one items before it closes (by clicking outside of the list)
I couldn't find anything in the api, so i hope you guys know the trick
Another solution would be if you hover over the button, then the menu opens. When you leave the menu with your mouse, the menu would close.
Cross post from the mailing List:
http://qooxdoo.678.n2.nabble.com/Keeping-a-menu-open-after-selecting-an-option-td7580767.html;cid=1345706918184-716
Answer from the list:
In order to keep the menu open after clicks, you need to provide your
own implementation of menu.Button. You can subclass qx.ui.menu.Button,
and then need to overwrite the _onClick method so it doens't call
qx.ui.menu.Manager.hideAll (Have a look on qx.ui.menu.Button source code).
Then, onMouseout of the entire menu, call
qx.ui.menu.Manager.getInstance().hideAll().

WPF: Context Menu dissapears after item update in my GridView

so, I have this ListView in grid mode. I am dynamically updating it using a CollectionView. now, the problem I have is that when I open a context menu by right clicking on an item in my grid the context menu closes after the item updates--now, it is not a new item but it is the same item. Does anyone have any ideas on how I can make the contet menu stay open after the item updates?
[Edit]
The grid is part of a public safety application that updates in near real-time. so the items are periodically added, removed, and updated. If we right-click on an item to open the context menu and an update occurs before I can close it--even if the particular item does not change in any way--the context menu closes. The desired behavior is for the context menu to remain open.
If you could supply your XAML that would help, but my guess is that you have defined the context menu on the ListViewItem element and that the menu closes because the whole ListViewItem is regenerated or replaced by WPF.
Perhaps you can define the context menu on the ListView instead? You will have to update your commands and get the selected item from the list when executing, since the context will no longer be a specific item.

Resources