King_V
unread,Nov 11, 2011, 3:52:56 PM11/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
All,
I'm working on my ever-evolving bit of code, and have run across
something of an issue. My apologies for the lengthy prelude before I
get to the actual question.
Firstly, I have a "full-browser-screen" display - a DockLayoutPanel.
Within it are a:
MenuBar - NORTH
FlowPanel - SOUTH
Now, there's a big empty section in the middle, which is fine because
that's what I want.
The MenuBar looks like a typical application - File, with sub-items
Open, Close, etc. Edit, with sub-items Copy, Paste, etc.
I have also created a, for lack of a better term, WindowPrototype
class that extends DialogBox. It has a close button, minimize, and
maximize. I have not yet done draggable resizing with the corners and
edges.
So, my test code basically, when an item in the menu is chosen, it
launches one of my WindowPrototype objects (which is mostly empty,
just some text to show which item in the menu launched it).
Now, of course, by default, DialogBox does not allow popping up of non-
modal instances of itself over each other. The LAST one shown is
ALWAYS on top - clicking on a partially hidden one does NOT bring it
to the top.
To get around this, I used a trick I came across on a web-search which
puts a static int in the class that extends DialogBox (in my case, the
WindowPrototype class), and increments it every time a new
WindowPrototype is opened, or one is clicked to be brought to the top.
This actually works fine as far as my WindowPrototype objects are
concerned.
However, when I do this, then there's a problem with the MenuBar
items. If I click on a menu item, say File, then the subitems (Open,
Close, etc) are shown UNDER any WindowPrototype object that happens to
be in the area - the WindowPrototypes will obscure the menu items.
Now that I've written half a novel, here's my question: How do I add
the ability for my WindowPrototype objects to be clicked on to bring
to the top, but ALSO make sure that the MenuBar items are ALWAYS on
top of any/all WindowPrototypes that may be on the screen?
Thanks in advance.