Announcement

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

    SectionStackSection doesn't recognize canvas height in px

    Hello,

    if I set the height of a canvas item in pixel and use this canvas in a SectionStackSection the size is not taken into account:
    Code:
    	@Override
    	public void onModuleLoad() {
    		SectionStack stack = new SectionStack();
    		SectionStackSection s1 = new SectionStackSection();
    		Canvas lg1 = new ListGrid();
    		s1.setItems(lg1);
    		s1.setExpanded(true);
    		SectionStackSection s2 = new SectionStackSection();
    		Canvas lg2 = new ListGrid();
    		s2.setItems(lg2);
    		s2.setExpanded(true);
    
    		lg1.setHeight("100px");
    		lg2.setHeight("300px");
    		stack.setSections(s1, s2);
    		stack.setWidth100();
    		stack.setHeight100();
    		stack.setVisibilityMode(VisibilityMode.MULTIPLE);
    		stack.draw();
    	}
    If I set the height in % it works. Am I doing sth. wrong? I'm using SmartGWT LGPL 3.1p 2013/01/02.

    regards Andreas

    #2
    A SectionStack manages the space available to it, by allocating that space to one or more open sections. If we honored explicit pixel heights for sections, we would no longer be allocating available space - it would be a different kind of container really.

    Comment


      #3
      Is there a way to get Section 1 exactly X px and Section 2 the Rest of the space?

      Comment


        #4
        As mentioned, we don't support setting the height of sections to explicit pixels. However, If you use percentages to assign a very small percentage to section but add content to that section with an explicit height, it should expand (if needed) to display that content when expanded. Thus, you may be able to configure the content's size to do what you want.

        Comment

        Working...
        X