I take back my last message.
This is still messed up.
This only creates scrollbars if the VBox or HBox is smaller than the 
Legend's display area.
As Ely, mentioned, Legend extends from Tile.
That's why it has the wrapping going on when a legend has more items 
than can be displayed in a line.
If you have a sizeable legend, I don't see a way currently to add a 
scrollbar. 

As an alterantive, you could create a hard coded legend. In my case 
the items are added dynamically, and the series/legend colors are 
determined by info in my dataProvider, so i can't hard code a legend.

--- In flexcoders@yahoogroups.com, "mgrayfmr" <[EMAIL PROTECTED]> wrote:
>
> Hey guys:
> 
> Just an update to this problem.
> If you put the legend inside a VBox or HBox, and set a fixed 
> width/height, scrollbars can be added. This assumes the 
scrollpolicy 
> is set to either 'auto' or 'on'.
> I tried this out and it worked. The only drawback is you can't use 
> percentages for width and height.
> 
> Cheers,
> Mike
> 
> --- In flexcoders@yahoogroups.com, "thunderstumpgesatwork" 
> <thunder.stumpges@> wrote:
> >
> > I did Anchor both the left and right sides of the HBox. Maybe the
> > appearance of the scrollbars for the HBox caused the outer canvas
> > scrollbars to appear too?
> > 
> > I'll check this out again when I upgrade to Beta2.
> > 
> > thanks for the info.
> > Thunder
> > 
> > --- In flexcoders@yahoogroups.com, "Ely Greenfield" <egreenfi@> 
> wrote:
> > >
> > > 
> > > 
> > > Hi Thunder.  The chart legend wasn't built to scroll. For 
> codesize
> > > reasons, it extends Tile, which means it inherits scroll 
> functionality,
> > > but it's been explicitly disabled.
> > > 
> > > Assuming you either anchored both sides of the hbox 
(left/right 
> or
> > > top/bottom, depending on what direction you're talking about) 
or 
> set an
> > > explicit width/height, it should definitely constrain the 
hbox, 
> forcing
> > > scrollbars. 
> > > 
> > > Ely.
> > > 
> > > 
> > > -----Original Message-----
> > > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On
> > > Behalf Of thunderstumpgesatwork
> > > Sent: Friday, March 24, 2006 12:07 PM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Flex2 - Bug with chart Legend and 
> ScrollPolicy
> > > 
> > > Hi,
> > > 
> > > I am trying to get the chart legend to scroll if there are 
more 
> items
> > > than room to display. I have set the 'hScrollPolicy' to "auto" 
> both in
> > > mxml, and after adding the chart series, in ActionScript.
> > > 
> > > In the debugger the value is always 'off' even immediately 
after 
> setting
> > > it.
> > > 
> > > To work around this I tried putting the legend in an HBox to 
> perform the
> > > scrolling. I am using Anchor LayoutConstraints on a Canvas, 
and 
> I put
> > > the Anchor on the HBox, but aparently it doesn't take 
precedence 
> over a
> > > large child (the legend) because the HBox just grew, and 
caused 
> the
> > > whole canvas to add scrollbars.
> > > 
> > > This may be two bugs, but seems like at least one.
> > > 
> > > let me know if I'm missing something.
> > > thanks,
> > > Thunder
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --
> > > Flexcoders Mailing List
> > > FAQ: 
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > > Yahoo! Groups Links
> > >
> >
>


Reply via email to