I have a certain View.
In this view there is a TreeViewer.
When I right-click one element of the tree, I open the contextual menu that trigger the command "rename".
In the HANDLER of this command, how can I obtain the ID of the view of the selected element?
Is it possible to get it?
Thanks very much to everyone will answer!
See HandlerUtil. In this example, since you right-click on an element in a view, it should become active and you can use
HandlerUtil.getActivePartId(e);
Related
If you have a TreeView in a VS Code extension, when you click on the items in it, they get selected (highlighted green, in my color theme). Click away from them and they get un-highlighted. See the below screenshot, in the file explorer view:
I'd like to "take control" of this behavior. I want to disable the highlighting that happens by default when the user clicks on these items, disable the un-highlighting that happens when they click away, and control in my extension code when the items get highlighted. I'd like to do this in my extension's custom TreeView, not an existing one.
Use the 'reveal' method of the treeview item. You can specify if it's to be 'selected' and also 'focused'.
Basically, you can change to the structure you want by forcing a refresh of the whole treeview. You probably already know that if you started making treeview extensions for vscode...
But then, right as it finishes re-rendering the tree, you 'reveal' a node, with the 'select' parameter option, to have that node as the selection in the tree. ...To have another node selected, just 'reveal' another one. (no need to force a full refresh of the treeview if it's only to have another node selected without changing the structure of the tree.)
see the 'reveal' method of the treeview here treeview API
Also see the leointeg extension on vscode for actual code example of controlling which node is selected
I was wondering if it's possible to write a convention that permits me to perform operations at context menu opening when the context menu is placed inside a radgrid
As I ve seen it's not possible to bind an event to a function...but maybe I'm wrong
Thansk
RadGridView from Telerik? works just fine with context menus. How are you trying to do it?
Hello the main problem I ve is that when I choose selection unit=cells I don't have the selecteditem selected... I wish that with right click it automatically updates my selected item puttin in the convention the contextmenu.getclickeditem()... Do you know if it's possible?
Thanks
As declared in the title, for example, I want to search for a button whose name is button8, within a form where there are so many buttons that I do not want to check the name one by one.
Can I do this in VB6?
You should just be able to refer to the control via the controls collection, like so:
Me.Controls("Button8")
See this link.
Here's how to find a control in the form designer, if you know the name.
Go to the form designer, open the property window (press F4), and use the dropdown to choose the control. This shows the properties in the window (and you can edit them). It also selects the control onscreen.
I am making a GUI with FLTK and I am wondering if there is a widget for something resembling a drop-down menu. I want one value to be shown, then have the user click the value (or something else associated with it), then a list of values be shown for the user to select one from, then the list collapse again. I have been unsuccessful finding documentation for a widget that can do this so I thought I would ask. Any help is appreciated.
I believe you are looking for FL_Choice.
When a user clicks once on an item in a Grid or a ListBox, that item is usually selected, hence most UI frameworks have a onSelected event or the like for that.
However, how can we generally call the next step when a user "finally" selects an item by e.g. double clicking an entry? You know when some popup might appear in the context of the selected item and the user can do further stuff.
Strangely enough, I think I have never seen a word for that in any UI framework.
onPicked, onAccepted, onChosen, onFinallySelected, onResult? All kinda awkward or too special. Any other ideas?
I haven't found anything wrong with SelectionChangeCommitted
The wxWidgets framework uses the term activated to describe what you're talking about. So, the method could be called onActivated.