I haven't even read through most of your example but I'm guessing what you
need to do is specify minHeight on a few of your inner VBoxes. By
specifying minHeight some of the sizing will get forced down into the inner
boxes instead of propagating outward. Even a minHeight of 0 should do it.
Matt
-Original Message-
From: Matthew Shirey
To: flexcoders@yahoogroups.com
Sent: 3/31/2005 1:40 PM
Subject: [flexcoders] Scrollbars in a VBox
With all these pricing things up in the air its hard to think about
coding, but I do have a bit of a problem I'm trying to work out.
I have a layout that has multiple nested VBox components with a
repeater on the inside. For my application this repeater is going to
be repeating a custom component based on a dataProvider. My problem
is that Flex wants to put the scroll bars on the outer most VBox
instead of the innermost one thats closest to the repeater. I have
tried many variations of vScrollPolicy settings, but the problem seems
to be somewhere else. Is there a way other than setting a specific
size for the VBoxes that I can tell the inner most VBox to be the one
that has a scroll bar? I have included some sample code to show my
problem. In this example the scroll bars are actually going on the
application control. This is a very simple example that is similar to
the layout in my application and still shows the problem. I know I
could use a List or a Datagrid with a custom renderer but both have
behaviors I don't want. I was hoping to just be able to use a
repeater and have scrollbars on the parent vbox. Any help would be
greatly appreciated.
Thank you,
-- Matthew
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml
http://www.macromedia.com/2003/mxml
mx:Script
![CDATA[
var list:Array = [a, b, c, d, e, f,
g, h, i, j, k,
l,
m, n, o, p, q,
r,
s, t, u, v, w,
x,
y, z
];
]]
/mx:Script
mx:VBox id=outer width=100% height=100%
backgroundColor=#FF borderStyle=solid borderThickness=5
borderColor=#FF
mx:VBox id=middle width=100% height=100%
backgroundColor=#FF borderStyle=solid borderThickness=5
borderColor=#FF
!-- Scrollbars Need to be on this VBox \/ \/ \/ --
mx:VBox id=inner width=100% height=100%
backgroundColor=#FF borderStyle=solid borderThickness=5
borderColor=#00FF00
mx:Repeater id=rpList dataProvider={list}
mx:Label text={rpList.currentItem} /
/mx:Repeater
mx:Label text=Item Count: {list.length} /
/mx:VBox
/mx:VBox
/mx:VBox
/mx:Application
_
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service http://docs.yahoo.com/info/terms/ .
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/