Is it possible to hide popover arrow in gtk3? - gtk

Is it possible to hide popover arrow in gtk3?
gtk4 has https://developer.gnome.org/gtk4/unstable/GtkPopover.html#gtk-popover-set-has-arrow
I looked at the documentation but couldn't find anything.

You might use the "gtk_menu_button_set_use_popover" function. Here is a sample piece of code referencing a GTK menu button named "editbutton".
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(editbutton), FALSE);
The result is a menu list that looks like a pop-up without the arrow.
Here is what an illustration of the result of adding that line of code to a sample program of mine.
Perhaps that will provide you with the desired display in your program.
Regards.

Related

Is it possible to add search filter/box to a tree view component?

Im making an extension and I'm curious is it possible to add a search filter/box to a tree component?
Im currently coding the extension in javascript but im not sure if its possible or not
This is what i want to add in at the top of my tree view
It will be built-in to vscode in v1.70. Here it is working in a treeView that I wrote for vertical tabgroups:
The placement of the find widget is a little unfortunate right now.
WHen you have focus in the treeView Ctrl+F is bound to the command list.find which brings up the Find in list/treeView widget.
You need to enable the filter option icon to see it work.

How to Show the Code and design window in dreamwaver

I cant see the design of my code in dreamwaver. i want to switch the code to design. please help meenter image description here
Got to - View, Toolbar (right at the bottom), and select Document from the
fly out list (assuming it is unticked).

How to add tooltip entries for items in Eclipse SWT combo

The exact already asked question to what I'd like to do is: how to add tooltip on the entries and not the combo....
I cannot use a CCombo. JoeYo said that he solved it by using a DefaultToolTip class on the Combo, but he didn't elaborate.
Can anyone, (#JoeYo hopefully) give me a bit more detail how to got the handle on the list, once dropped, to capture the mouse hover events, and then of course display the tool tip?
If I was supposed to ask for more info on the original question, I could not figure out how. I tried to comment, but was told I did not have enough credits.
DefaultToolTip is part of JFace. Other than the native tooltip of the platform, it can be freely positioned and shown/hidden. Internally it is comprised of a Shell that when shown stays on top of all other controls.
In combination with a MouseListener, the getVisibleItemCount() and getItemHeight you might be able to compute above which item (if any) the mouse cursor hovers and show a tooltip with suitable content.
This answer has a snippet that computes which item of a List widget is under the mouse pointer. It should be possible to adapt it for the Combo widget. The remaining difficulty is probably to figure out the of the drop-down and the gap between of the Combo and its drop-down.

JavaFX 2 custom popup pane

The JavaFX 2 colour picker has a button that pops up a colour chooser pane like so:
I'd like to do something similar, in that I'd like a custom pane to pop up when the button is clicked on and disappear when something else is clicked (in my case, a few image thumbnails). What would be the best way of achieving this? Should I use a ContextMenu and add a pane to a MenuItem somehow, or is there something else I should look at?
It's kind of difficult to do well with the current JavaFX 2.2 API.
Here are some options.
Use a MenuButton with a graphic set in it's MenuItem
This is the approach taken in Button with popup showed below's executable sample code.
Use a PopupControl
Take a look at how the ColorPicker does this in it's code.
ColorPicker extends PopupControl. You could do this, but not all of the API required to build your own PopupControl is currently public. So, for JavaFX 2.2, you would have to rely on internal com.sun classes which are deprecated and will be replaced by public javafx.scene.control classes in JDK8.
Use a ContextMenu
So, I think your idea to "use a ContextMenu and add a pane to a MenuItem" is probably the best approach for now. You should be able to do this by using a CustomMenuItem or setting a graphic on a normal MenuItem. The ContextMenu has nice relative positioning logic. A ContextMenu can also be triggered by a MenuButton.
Use a Custom Dialog
To do this, display a transparent stage at a location relative to the node.
There is some sample code to get you started which I have temporarily linked here.
The sample code does relative positioning to the sides of the main window, but you could update it to perform positioning relative to the sides of a given node (like the ContextMenu's show method).
Use a Glass Pane
To do this, create a StackPane as your root of your main window. Place your main content pane as the first node in the StackPane and then create a Group as the second node in the stackpane, so that it will layer over the top of the main content. Normally, the top group contains nothing, but when you want to show your popup, place it in the top group and translate it to a location relative to the appropriate node in your main content.
You could look at how the anchor nodes in this demo are used to see how this might be adaptable to your context.
Is there a relevant update for this for JavaFX8?
There is not much difference of relevance for Java 8, in general the options are as outlined in this post based on Java 2.2 functionality. Java 8 does add Dialog and Alert functionality, but those are more targeted at use of dialogs with borders, titles and buttons rather than the kind of functionality desired in the question. Perhaps you might be able to start from the Dialog class and heavily customize it to get something close to what is needed, but you are probably better off starting from a blank stage or PopupControl instead.

How to disable hover effect to highlight menu items in GWT MenuBar?

I am making a vertical Menu using GWT MenuBar and selection of particular MenuItem shows content on the right, I am trying to make something similar to TabPanel, but with Tabs on left instead of being on top. Now, since I've got the Menu items and actions in place, I want to remove the effect of hovering over and changing color, and keep that menu item selected which was clicked last and whose content is loaded on the right.
I am open to any comments, if you have a better solution to implement this, using some other components(with-in) GWT, please drop in a comment with your suggestions, I'll really appreciate that.
Or if you can just tell me how can I disable this effect, of hovering and sticking to only that selection, That would be awesome too..
Thanks to everyone, taking time to read this and suggesting a solution.
It's all defined in the CSS of your GWT's theme (probably the default one), so it's a matter of overriding those styles - make sure it's not the other way around :) Inspect the code with a tool like Firebug to see what's exactly being set and change that.