View Full Version : How do I get scroll bars to work
Jerry62712
11-09-2009, 03:53 PM
Attached is the problem I'm getting. I don't want the vertical scroll bar. It may be causing the loss of data which is also a problem.
I think it comes from the horizontal scroll bar causing the container to expand vertically. I want the container to grow vertically if needed, not a scroll bar to appear.
mattb
11-09-2009, 05:30 PM
Attached is the problem I'm getting. I don't want the vertical scroll bar. It may be causing the loss of data which is also a problem.
I think it comes from the horizontal scroll bar causing the container to expand vertically. I want the container to grow vertically if needed, not a scroll bar to appear.
You're probably correct. Because your display area is extending horizontally, the area required more vertical space for that scrollbar so is adding a vertical scrollbar.
You can force the scrollbar not to appear by setting verticalScrollPolicy="off" on the relevant display object.
Jerry62712
11-09-2009, 07:19 PM
Thanks for the reply. Here is the code in question (with edits to remove the various labels and textInput fields):
<mx:AddChild relativeTo="{bodyFormHolder}" position="firstChild">
<mx:VBox id="resultsPageBox"
backgroundColor="#dedacf"
width="100%"
height="100%"
verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:HBox id="rAccessHBox"
minWidth="640" width="100%"
x="0" y="0">
...
</mx:HBox>
<!-- across top *********************************************** -->
<!-- ************************************************** ******** -->
<mx:VBox id="topResultBox"
verticalScrollPolicy="off" horizontalScrollPolicy="off"
width="100%"
styleName="backColor" >
...
</mx:VBox>
<mx:HBox id="bothSides" <== line 22 ********
verticalScrollPolicy="off"
width="100%"
height="100%">
<!-- first column ***************************************** -->
<!-- ************************************************** **** -->
<mx:VBox id="leftSideCanvas"
verticalScrollPolicy="off"
width="50%"
height="100%"
focusEnabled="false"
styleName="backColor">
...
</mx:VBox>
<!-- second column **************************************** -->
<!-- ************************************************** **** -->
<mx:VBox id="rightSideCanvas"
verticalScrollPolicy="off"
backgroundColor="#dedacf"
y="0"
width="50%"
height="100%">
...
</mx:VBox>
The vertical scroll box appears next to line 22 (bothSides), that is from that container to the end of it.
mattb
11-09-2009, 07:29 PM
Without knowing what each box contains it's not easy to tell what is causing the scrollbars. You also may want to look outside this section - ie is this code contained withina Canvas, and the scrollbar is being added by that Canvas?
Jerry62712
11-09-2009, 08:09 PM
Thanks, you got me looking and I found it was on the form object.
The sad thing is it didn't take care of the problem of loss of data. Nor can I seem to access the horizontal scroll bar via the keyboard.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.