Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    0
    aievas is on a distinguished road

      0  

    Default 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);
        }

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    From the applyStyles javadoc (emphasis mine):
    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)
    Your code should read:
    Code:
            nameAndLogoContainer.getElement().applyStyles("zIndex: 1000;");

  3. #3
    Ext GWT Premium Member
    Join Date
    Mar 2010
    Posts
    41
    Vote Rating
    0
    aievas is on a distinguished road

      0  

    Default


    ok thanks - I missed that

Thread Participants: 1

Tags for this Thread