Orange3 widget menu items are disabled - orange

I was wondering why the items in the top "Widget" menu of a freshly installed Orange3 installation are disabled.
Is there some setting that I need to enable in order to be able to open widgets? There seems to be nothing in the documentation that mentions this particular menu items and what it does.
Thanks,
Ralph

Those are options to work with a selected widget. They are disabled when no widget is selected at the workspace. So if you want to use them first place any widget at the workspace. When you single click at the widget on the workspace you will see that those options become enabled.

Related

How do I a menu like the open menu from Gedit?

I am creating an application and would like to have a drop-down menu to search for files like the open menu in Gedit. What widgets do I need yo do this?
I have tried the menu widget and cannot find a way to get searching to work.
Note: I cannot find where in the Gedit source code the open menu is.
There is no widget provided by GTK out of the box to implement the gedit "Open" menu button:
Gedit implements it inside its own code base, using a GtkMenuButton that opens a GtkPopover widget containing a GtkSearchEntry, for the input field used for search, and a GtkTreeView for showing the search results. Plus, a GtkButton at the bottom to launch a GtkFileChooserDialog in order to select more files.
The tree view's model is populated using the recently used files list gathered from the default GtkRecentManager; you can get a list of all recently used files and filter them by application name; after that, you can filter them with the contents of the search entry.
If you want to know more about how a GTK application is built you should use the GTK inspector, which is provided by GTK itself as a debugging and development tool.

How to highlight MenuItem programmatically in SWT

I open a context menu programmatically. Now additionally I would like to highlight the first menu entry.
This highlighting happens when I move with the mouse over the context menu or press the arrow keys on the keyboard. I am interested how I can trigger this programmatically.
I know the API of MenuItem does not offer this feature out of the box. So I tried to fire some MouseEvents of the type MouseOver and MouseHover, but without any success.
Has anybody an idea how to implement this feature?
I am not sure if you can change menuitem highlight colors, I haven't seen any previous example before. Look at this though: Change eclipse menuitem color
If you want to simulate what the user does and if you happen to know the location of the menu item, you can use Display#setCursorLocation() to position the mouse pointer over the menu item.
Note however, that if and how a menu item is highlighted is platform specific.
You should not use this method other than for demonstration of test purposes. If your application needs to highlight or preselect an entry in a list of choices,
you should probably use another widget. If you more describe your use case, we may be able to find a suitable widget.

Why some widgets do not get included in WindowBuilder?

Im using WindowBuilder tool to build a GUI for my application and I see that some widgets or tools don't get included in the Design view. In my case, I have created a new SWT Application window and I try to add DropDown Menu in the Application window and I always get a red icon when I take the DropDown menu from the palette to the design area. Can anyone tell me what is the problem in this case?
I found the mistake I was doing...It is not possible to directly add a DropDown Menu in the design editor. You first have to add a Menu and then add a DropDown Menu. And the widgets do work in all forms of applications you want to develop.

Adding menu listener for Paste option in SWT Browser

I have a org.eclipse.swt.browser.Browser instance created in a composite. I would like to know when some content is pasted in the browser using the (platform specific) right click context menu and selecting the paste option.
In the menuDetected() of MenuDetectListener, I get a notification when the context menu is detected in the browser.
How can I know if the Paste option is selected from the context menu?
Regards,
Noopur
No you can't access the selected context menu item. There is no direct provision for that. At least not in eclipse 3.7. Although, you could try different combinations of events for determining the menu item. For example, in windows the internet explorer populates the status bar with 'inserts the clipboard...' when your mouse pointer hovers over the Paste menu item, you can capture this using StatusTextListener event.
Note: The hack is not an elegant solution, even if you get it working, there is still some possibility that it may break with new or older releases of SWT or in fact its behavior may vary with operating systems !!

In Eclipse How to Enable and Disable Main Menu Items in Run time

During menu added into the main menu of eclipse which has sub-menus. I need these sub-menus to be enabled/disabled based on a condition
which I can check programmatically.
Enabling/Disabling the items via plugin.xml is static, even if a condition can be checked it is only after we click on the menu item.
How to happen at run time when the user clicks the Menu itself rather than the sub-menu items.
Use action enablement property in plugin.xml, refer to
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_actionSets.html