GWT - Vertical border line divides panel on two parts - gwt

Does anyone know how to make, in GWT, panel which has a vertical boundary line that divides the panel on two parts same like this http://code.google.com/webtoolkit/overview.html ?
I want when click on the blue border line to hide/show left menu same as on the above link.
I can't to find any example of that.
Thank you.

Here is your boy : http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/VerticalSplitPanel.html
You can configure the handler of the bar so that it does what you want.

Related

Visual-Studio-Code: How to maximise width of code area?

When I toggle panels I get an empty space in my workarea.
Pic is the example. Red area is not used.
Already tried:
Use mouse to move borders.
Togle view/apparance
Solution: F1 > toggle centered layout Found it in github issue https://github.com/Microsoft/vscode/issues/53778
go view->apperance->toggle centered layout.
Happy coding :)

Add to vertical panel from bottom to top in gwt

I have a vertical panel in gwt and I want to add widgets into it from bottom to top.
In some reasons I want this.
Is that possible?
Actually I want to show results vice versa.
You can use
insert(Widget w, int beforeIndex)
Here, for bottom to top, you need to set beforeIndex to 0
Refer to GWT Vertical Panel
I think a best approach is to create your own VerticalPanel by creating a class that extends Composite, and implementing desired behavior.addToButtom() , addtoTop() ...

How to check which place in panel was clicked? GWT

How can I check which place in Panel Was clicked? I know, I have this some functions:
getClientX, getClientY, getNativeButton, getRelativeX, getRelativeY, getScreenX, getScreenY, getX, getY
but how can I check which click Was near right side of panel and which was near left side of the panel?
I can't add to the Panel two div's with 50% width and detect in that way..
More info:
It's a lot of panels. I must do this in each of panel. I don't know how many panels we have. We have got a constans width of each panel = 400px.
Regards!
Assuming you're handling an onClick event or similar for a panel, you can get the cursor position with getClientX or something similar. Then just get the position and size of the panel and simply check what you're closet to; all elements are rectangular, so shouldn't be too difficult to just write four ifs for it.
The getElement() method will give you the panel's underlying element, so you may need to use that to get the exact size and position.

GTK comboBox flowing to fill vertical space in toolbar

I'm building a toolbar in PyGTK and attaching a combo box to it. The result that I got is that the combo box stretches to fill all the vertical space available:
I have been trying every trick in the book that I can think of in order to avoid it, but I'm starting to admit that maybe it's just GTK style and I won't be able to get rid of it.
I can post some code but this should be quite simple to recreate. Any idea?
Wrap the combobox in a gtk.Alignment. You can create the latter with 0.5 vertical alignment to have the combobox centered vertically.

Gtk layered layout

I am building a simple interface using a 3 row GtkVbox. Inside middle row, I'd like to show a centered image and a small config panel. If config panel is shown, it must appear over the image. How could I simulate a layered panel where the config panel appers in an upper level than the image. Any ideas?
Regards
Overlaying widgets on top of each other isn't really what GTK is built for - you might be using the wrong tool for the job. Maybe you should check out Clutter?
I believe you can use GtkOverlay to put the panel over the image.