Announcement

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

    Nesting problem!

    Hello,

    I have a problem. I would like to outline my application in the right direction. There are four sections in my application. A header (North), a navigation (West), details section (center) and a hidden section on the right (east). First, I want the eastern section, where you click on the resize bar, opens to the left and hide all the sections (north, west, center) and when you press for close, it is back to the original. It is there an event that I can use for that?

    I also know what would be best to build this application (All members and Layout)?

    How do I organize resize elements within its sections (auto fit)?

    Thanks a lot
    Attached Files
    Last edited by Pulse; 4 Apr 2009, 06:45.

    #2
    Put an HLayout containing Navigation, Details and the hidden third pane as members. setVisibility("hidden") on the third pane. setShowResizeBar(true) on the Navigation and Details panes, with setResizeBarTarget("next") on the Details pane.

    Put this HLayout into a VLayout to combine it with the header area (along the top).

    Comment


      #3
      Hi Isomorphic,

      Thanks for the fast reply !

      I present the same problem :-(

      Here is my code ...

      Code:
       
                  VLayout mainLayout = new VLayout();
                  mainLayout.setWidth100();
                  mainLayout.setHeight100();
      
                  HLayout othersLayout = new HLayout();
      
      	    Label lblHeader = new Label();
      	    lblHeader.setAlign(Alignment.CENTER);
      	    lblHeader.setOverflow(Overflow.HIDDEN);
      	    lblHeader.setHeight("10%");
      	    lblHeader.setShowResizeBar(true);
      	    lblHeader.setShowEdges(true);
      	    lblHeader.setEdgeSize(2);
      
      	    mainLayout.addMember(lblHeader);
      
      	    Label lblNavigation = new Label();
      	    lblNavigation.setAlign(Alignment.CENTER);
      	    //lblNavigation.setOverflow(Overflow.HIDDEN);
      	    lblNavigation.setWidth("20%");
      	    lblNavigation.setShowResizeBar(true);
      	    lblNavigation.setShowEdges(true);
      	    lblNavigation.setEdgeSize(2);
      
                  othersLayout.addMember(lblNavigation);
      
                  Label detailsLabel = new Label();
                  detailsLabel.setContents("Details");
                  detailsLabel.setAlign(Alignment.CENTER);
                  //detailsLabel.setOverflow(Overflow.HIDDEN);
                  detailsLabel.setShowResizeBar(true);
                  detailsLabel.setResizeBarTarget("next");
                  detailsLabel.setWidth("*");
                  detailsLabel.setShowEdges(true);
                  detailsLabel.setEdgeSize(2);
      
                  othersLayout.addMember(detailsLabel);
      
                  Label lblDashBoard = new Label();
                  lblDashBoard.setExtraSpace(1);
                  lblDashBoard.setAlign(Alignment.CENTER);
                  //lblDashBoard.setOverflow(Overflow.HIDDEN);
                  lblDashBoard.setVisibility(Visibility.HIDDEN);
                  lblDashBoard.setWidth("*");
                  lblDashBoard.setShowEdges(true);
                  lblDashBoard.setEdgeSize(2);
                  othersLayout.addMember(lblDashBoard);
      
                  mainLayout.addMember(othersLayout);
      Last edited by Pulse; 2 Apr 2009, 04:53.

      Comment


        #4
        When asking for help, always describe what the problem is.

        Comment


          #5
          The problem is when I press the resizebar of detailsLabel, must lblDashBoard opens completely on sections detailsLabel and lblNavigation! At present, it does that about 15-20% of the screen.

          Thanks .
          Last edited by Pulse; 4 Apr 2009, 14:02.

          Comment


            #6
            The solution we provided is for a resizable splitpane with each pane collapsible and one pane initially collapsed. If you are instead trying to allow the user to switch between two mutually exclusive screens, the usual way to do is a TabSet.

            However if you really want to show this with an appearance that is closer to a split pane (we wouldn't recommend this as it violates typical user expectations), place a widget (anything will do) as the last member of the HLayout, and add a click handler that simply hides the components you want hidden, and shows the components you want showing. The HLayout will automatically react to this.

            Comment


              #7
              I created a tabset and it works very well!

              Thank you!

              Comment

              Working...
              X