What if you set the vbox1 width/height to
100%. Then it will have a scrollbar as necessary I think.
Matt
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Rajesh Jayabalan
Sent: Friday, August 19, 2005 5:56
PM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Scrollbar in
canvas
Hi,
I have vScrollPolicy="auto" in a canvas
and a vbox inside it with a
repreater which creates a buch of elements
(labels, combos)
In some cases the scrollbar works fine and shows
correctly, but in
some cases the scrollbar does not show up at all,
I have tried setting
it to on and in that case it shows a solid bar
where the scroll bar
should be again this happens only some times..
Here is the code.. the data changes and repeater
can have any number
of iterations.
Anyone know how to get the scrollbar to be created
after all the other
code has been executed.
<mx:Canvas id="prodCanvas"
width="100%" height="100%" marginRight="0"
vScrollPolicy="auto"
hScrollPolicy="off">
<mx:VBox id="vbox1"
verticalAlign="middle" verticalGap="3">
<mx:Canvas clipContent="false"
width="150" height="140">
<mx:Image source="{dataObject.image}"
width="150" height="140"
mouseOverEffect="big"
mouseOutEffect="small"/>
</mx:Canvas>
<mx:Label id="prodName"
text="{dataObject.name}"
styleName="labeltitle"
height="15"/>
<mx:Label text="{USDformatter.format(dataObject.price)}"
styleName="priceThumb"
height="15"/>
<mx:HBox>
<mx:Label text="Description"
width="75" height="15"
styleName="labeltitle"
visible="{(desctext.text =='')?false:true}"/>
<mx:TextArea id="desctext"
editable="false"
text="{dataObject.description}"
width="150" visible="{(desctext.text
=='')?false:true}"/>
</mx:HBox>
<mx:Repeater id="att"
dataProvider="{attArr.Attribute}">
<mx:HBox>
<mx:Label
text="{att.currentItem.Name}" width="75"
height="15"
styleName="labeltitle" />
<mx:ComboBox id="itatt"
dataProvider="{mx.utils.ArrayUtil.toArray(att.currentItem.Attvalues)}"
width="150" height="18"/>
</mx:HBox>
</mx:Repeater>
</mx:VBox>
</mx:Canvas>
Regards
Rajesh J
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Scrollbar in canvas Matt Chotin
-