you can change css at runtime by using something like;
widgetName.getElement().getStyle().setProperty("opacity","0.9");
widgetName.getElement().getStyle().setProperty("zIndex","400");
for whatever css propertys you want to change. (note that anything
with a hypthon, however, should lose it in the name, and the next
letter should be capital...hence, "zIndex" and not "z-index")
However, if your just moving a fix about left/right etc then just
using
RootPanel.get().setWidgetPosition(widgetName, left, top);
should work. (at least, when the widget isnt contained elsewhere).
On Aug 12, 5:53 am, Kah0ona <[email protected]> wrote:
> Hello,
>
> For my first GWT app I want to change the position of a div (HTMLPanel
> in my case) at run-time (e.g. after pressing a button).
>
> To do that i would like to do something like :
>
> - set the position to relative
> - set the top property of the div
> - set the left property.
>
> Any idea how? Or any different approach that achieves the same?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---