Hiya. I thought this one would be simple, but I can't fins a solution for it anywhere.
Using smartgwt 2.4.
I want to put a layout of some sort within a page, that content can dynamically be added to. I want this to be a fixed size, and when the added content exceeds this size, it shows scrollbars.
The root layout of the page is a 100%x100% VLayout.
Within this is a header, a "content" Layout, and a footer. I change the content Layout as the user goes to different pages, and it is always set to 100%x100%.
If within this content layout, I add a VLayout with a fixed size, and dynamically add widgets to this (just Labels or HTMLFlows), then it continues to expand, pushing the footer off the screen, and giving a whole-browser scrollbar.
Am I doing something wrong here? How can I get my content to have nice scrollbars like listgrids and whatnot have?
Currently something like:
And the entire page grows to accommodate the added widgets, the footer going off the page. No scrollbars appear on problemWidget. It seems to ignore the setting of its width & height.
What am I doing wrong here?
Thanks.
Using smartgwt 2.4.
I want to put a layout of some sort within a page, that content can dynamically be added to. I want this to be a fixed size, and when the added content exceeds this size, it shows scrollbars.
The root layout of the page is a 100%x100% VLayout.
Within this is a header, a "content" Layout, and a footer. I change the content Layout as the user goes to different pages, and it is always set to 100%x100%.
If within this content layout, I add a VLayout with a fixed size, and dynamically add widgets to this (just Labels or HTMLFlows), then it continues to expand, pushing the footer off the screen, and giving a whole-browser scrollbar.
Am I doing something wrong here? How can I get my content to have nice scrollbars like listgrids and whatnot have?
Currently something like:
Code:
Layout rootLayout = new VLayout(); rootLayout.setwidth100(); rootLayout.setheight100(); Canvas header = ... a menubar or something; Layout pageContent = new HLayout(); Canvas footer = ... a HLayout or something; pageContent.setWidth100(); pageContent.setHeight100(); rootLayout.addMember(header); rootLayout.addMember(pageContent); rootLayout.addMember(footer); ... pageContent.addMember([other parts of the page layout]); Layout problemWidget = new VLayout(); problemWidget.setHeight(200); problemWidget.setMaxHeight(200); problemWidget.setWidth(200); problemWidget.setMaxWidth(200); pageContent.addMember(problemWidget); //or it may be added nested more deeply within pageContent ... problemWidget.addMember(someWidget); // many times
And the entire page grows to accommodate the added widgets, the footer going off the page. No scrollbars appear on problemWidget. It seems to ignore the setting of its width & height.
What am I doing wrong here?
Thanks.
Comment