PopupPanel uses a different technique for setVisible. Since you're reading the code (good idea) you should read the comment there.
By the way, I was wrong about "deferred positioning", at least in the sense I meant it. I assumed there was a DeferredCommand down in there, but there isn't. 'visibility: hidden' allows the element to take up space in the layout without being visible, which allows its size to be sampled. 'display: none' takes up no space and does not allow the element's size to be sampled. It doesn't flicker because it was not actually rendered before it was positioned. Also, because it is absolutely positioned, the fact that it is 'visibility: hidden' does not "push" other elements out of the way. Something like that... Walden On Oct 21, 4:50 pm, r a f t <[EMAIL PROTECTED]> wrote: > btw, do you (or anybody) know how does that work exactly ? > > looking at the code, it makes popup invisible, shows it (didnt > understand what differs from making visible), gives callback a chance > to position and finally makes popup visible. i can not figure out how > that prevents a jump effect.. ?! > > On Oct 21, 5:44 pm, walden <[EMAIL PROTECTED]> wrote: > > > > > See: PopupPanel.setPopupPositionAndShow(PositionCallback callback). I > > have not had a problem with flicker. > > > Walden > > > On Oct 21, 10:36 am, r a f t <[EMAIL PROTECTED]> wrote: > > > > thank you. that sounds to be a good solution. what is that +ve by the > > > way ? > > > > On Oct 21, 5:28 pm, "Ian Bambury" <[EMAIL PROTECTED]> wrote: > > > > > AFAIK, it has to be attached and (theoretically) visible for you to get > > > > the > > > > size, but you can set the left position to -20000 or something silly so > > > > it > > > > won't be seen. Not +ve or you might get scroll-bars. If you find a > > > > better > > > > way, please post it :-) > > > > Ian > > > > >http://examples.roughian.com > > > > > 2008/10/21 r a f t <[EMAIL PROTECTED]> > > > > > > hello, > > > > > > placing certain widgets (such as a popup) requires size of widget, so > > > > > is it possible to get the size of a widget before making it visible ? > > > > > getOffsetWidth() / Height() methods return zero when widget is not > > > > > visible. > > > > > > making widget visible, getting size and then placing it seems to be > > > > > workaround but i guess it will cause flicker > > > > > > thanks, > > > > > r a f t- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
