-
23 Nov 2012 1:16 AM #1
applyStyles not working
applyStyles not working
If you run the underlying test case you can see that the style "z-index: 1000;" is not added to the div.
Test case:
Code:public class GXTTest implements EntryPoint { public void onModuleLoad() { setupStyleTest(); } private void setupStyleTest() { VBoxLayoutContainer nameAndLogoContainer = new VBoxLayoutContainer(); nameAndLogoContainer.setVBoxLayoutAlign(VBoxLayoutAlign.RIGHT); nameAndLogoContainer.getElement().applyStyles("z-index: 1000;"); nameAndLogoContainer.add(new TextButton("Name and Logo")); RootPanel.get().add(nameAndLogoContainer); }
-
23 Nov 2012 8:50 AM #2
From the applyStyles javadoc (emphasis mine):
Your code should read:Code:/** * Sets multiple style properties. Style attribute names must be in lower camel case, e.g. * "backgroundColor:white; color:red;" * * @param styles a style specification string */ public final native void applyStyles(String styles)
Code:nameAndLogoContainer.getElement().applyStyles("zIndex: 1000;");
-
24 Nov 2012 10:37 AM #3
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote