I'm running into a very basic issue with Layouts. I searched the forum but couldn't find a post on the issue.
I've created a standalone case to demonstrate the problem, and attached some screenshots.
Problem Description:
I have VLayout with both width and height set to 100%. Lets say the size of the window is 1000 x 600 and the size of the layout content is 600 x 800. In this case, only a vertical scroll bar is needed. However, I get an unnecessary horizontal scroll bar also in both FF 3.6.2 and Chrome 7x. But believe it or not, it works fine in IE 7, which shows only the vertical scroll bar. Refer to the screenshots of all three browsers.
I think the problem in FF and Chrome is that they don't discount the size of the vertical scroll bar in calculating the available width of the window.
Code:
Additional info:
I can get around the problem by setting overflow to AUTO. But that hides the browser's native scroll bar and replaces it with the widget's scroll bar (refer to the screenshot named Chrome_WidgetScrollBar.jpg). Usually it's not a problem, but it causes issues on iPhone. I see the extra scroll bar from the application, instead of just using the Safari's native scrollbar.
Another workaround is to set the width to 95% instead of 100%. That's acceptable to some level.
Is there a proper way to fix this issue? Am I the only one getting this issue? Am I doing something wrong? I'll appreciate any help.
Thanks.
I've created a standalone case to demonstrate the problem, and attached some screenshots.
Problem Description:
I have VLayout with both width and height set to 100%. Lets say the size of the window is 1000 x 600 and the size of the layout content is 600 x 800. In this case, only a vertical scroll bar is needed. However, I get an unnecessary horizontal scroll bar also in both FF 3.6.2 and Chrome 7x. But believe it or not, it works fine in IE 7, which shows only the vertical scroll bar. Refer to the screenshots of all three browsers.
I think the problem in FF and Chrome is that they don't discount the size of the vertical scroll bar in calculating the available width of the window.
Code:
Code:
VLayout rootVLayout = new VLayout(); rootVLayout.setWidth100(); rootVLayout.setHeight100(); rootVLayout.setOverflow(Overflow.VISIBLE); TabSet testTabSet = new TabSet(); testTabSet.setTabBarPosition(Side.TOP); testTabSet.setWidth(600); testTabSet.setHeight(800); Tab testTab = new Tab("Test"); testTabSet.addTab(testTab); rootVLayout.addMember(testTabSet); rootVLayout.draw();
I can get around the problem by setting overflow to AUTO. But that hides the browser's native scroll bar and replaces it with the widget's scroll bar (refer to the screenshot named Chrome_WidgetScrollBar.jpg). Usually it's not a problem, but it causes issues on iPhone. I see the extra scroll bar from the application, instead of just using the Safari's native scrollbar.
Another workaround is to set the width to 95% instead of 100%. That's acceptable to some level.
Is there a proper way to fix this issue? Am I the only one getting this issue? Am I doing something wrong? I'll appreciate any help.
Thanks.
Comment