Ian, you are right about the zindex. However the problem is that I need to have access to all the windows/ popups(floating divs) that are on my screen; and need to control zindexes of all. This might not always be possible. For example I am writing an reusable widget that has multiple popups which will always stay on the screen once my widget is instantiated. This widget will be used in different applications in my company. I have little or no access to what other popups/widgets/absolute divs will be open on the screen. However I need to make sure that any of the dialogboxes shown in my re usable widget are always on the top once they are dragged...
thanks any way... Do you by any chance happen to know how gwt manages the "popup on top of listbox" issue in its code? Rakesh Wagh On Jul 8, 5:29 pm, Ian Bambury <[email protected]> wrote: > Hide/Sow will work. So will zIndex. Try this: > public class Main implements EntryPoint, MouseDownHandler > { > DialogBox a = new DialogBox(false, false); > DialogBox b = new DialogBox(false, false); > > public void onModuleLoad() > { > a.setText("AAAAAAAAAAA"); > a.setWidget(new Label("aaaaaaaaa")); > a.getElement().getStyle().setProperty("backgroundColor", "cyan"); > a.getCaption().addMouseDownHandler(this); > a.center(); > > b.setText("BBBBBBBBBBBBB"); > b.setWidget(new Label("bbbbbbbbbb")); > b.getElement().getStyle().setProperty("backgroundColor", "yellow"); > b.getCaption().addMouseDownHandler(this); > b.center(); > } > > @Override > public void onMouseDown(MouseDownEvent event) > { > Widget d = (Widget) event.getSource(); > DialogBox c = (DialogBox) d.getParent(); > a.getElement().getStyle().setProperty("zIndex", "0"); > b.getElement().getStyle().setProperty("zIndex", "0"); > c.getElement().getStyle().setProperty("zIndex", "1"); > } > > } > > Ian > > http://examples.roughian.com > > 2009/7/8 Rakesh <[email protected]> > > > > > > > as I said, > > hide/show is not an option. Consider that the DialogBoxes are always > > in show state. User can drag them over each other. > > > Does any one know how PopupPanel manages z-index and lisbox on top > > issue? I looked in the PopupPanel class several times, without any > > luck :( > > > Rakesh Wagh > > > On Jul 7, 9:53 pm, Ian Bambury <[email protected]> wrote: > > > Have you actually *tried* a hide followed by a show to see the effect? > > > Ian > > > >http://examples.roughian.com > > > > 2009/7/8 Rakesh <[email protected]> > > > > > typo: > > > > ...All dialog boxes mantain the other ... > > > > = > > > > ...All dialog boxes mantain the "order" ... > > > > > On Jul 7, 9:39 pm, rakesh wagh <[email protected]> wrote: > > > > > I have multiple dialog boxes(or popup panels) on my screen. When I > > > > > drag one, it should show up on top of others. But that does not > > > > > happen. All dialog boxes mantain the other in which they were added. > > > > > Unfortunately show()/hide() is not the option for me. All my non > > modal > > > > > dialog box windows are always in the show() state. > > > > > > Any solution?? > > > > > > I tried playing around z-index a bit, but no luck so far. > > > > > > Thanks... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
