Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    MenuBar GWT behind of component smartGWT

    Hi,

    I have a MenuBar in the top. The problem is where I put some component smartGWT, then the menuItem of MenuBar are showing behind of the component smartGWT.

    I have try to put “z-index:1;” in the css of MenuBar, but it’s don’t work.

    There are some solutions?

    Thanks!!

    #2
    Set a high zIndex on the GWT component rather than trying to set a low zIndex on the SmartGwt component.

    Search this forum for "zIndex" for further advice and solutions.

    Comment


      #3
      Hi,

      I have try to put high z-index in MenuBar but doesn’t work.

      Code:
                  MenuBar m = new MenuBar(); 
                  m.setStylePrimaryName("menuBarC"); 
                    
                     .menuItemC { 
                              font-size: 9pt; 
                              cursor:hand; 
                              z-index:1111111111; 
                     }
      too I have try to put the z-index (low) in the canvas and windows than hidden the MenuBar. It’s work fine , but I the windows have a irregular behaviour.


      what can do?

      Thanks!!

      Comment


        #4
        The zIndex approach works - you may be setting it on the wrong components (eg the MenuBar instead of the Menu itself).

        Comment


          #5
          I found this in the file skin_styles.css
          Code:
          .tabBaseline {
          z-index: 10000000;
          }
          so I put a 10 times bigger zindex
          Code:
          myMenu.getElement().getStyle().setZIndex( 100000000 + level); //to be in front of SmartGwt
          at all my menu items
          The menu is still bellow SmartGwt FormPanel (this is a strange competition that will never end and will break the browsers)

          Workaround - you can hide any SmartGwt window (on a button) do the work and then show it again (on a different natural gwt button that becomes visible only when SmartGwt is hidden)
          Code:
          onClick ... // for both SmartGwt IButton thet hides the forms
                      //and for the natural Button that (re)Show the form    
              form_is_moved = ! form_is_moved;
              //main natural gwt container that even release screen space of all SmartGwt forms
              squaresFlexForm.setVisible( ! form_is_moved);
              //if you do some work in the gwt window, smartgwt buttons come back a mess
                    //IButtons are one on top of the other
              if( ! form_is_moved)
                  squaresPanelLayout.markForRedraw();
              // this are the mokup natural gwt butons whith Close and (Re)Show actions
              squaresFlexFormButtons.setVisible( form_is_moved);

          Comment

          Working...
          X