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
-~----------~----~----~----~------~----~------~--~---