[flexcoders] Displaying UIComponents vertically

2009-02-05 Thread annelie2008
Hi,

I'm having trouble with the layout of the musical score I'm 
displaying. It's generated from an xml file and I want the staves to 
be placed on top of each other but I can't make it work. I have a 
class which draws out the lines and the notes on it, so I instantiate 
that class, create the lines and notes, then create a UIComponent to 
add it to. There's three staves, so I do this for all three, then I 
add them all to a VBox which I display. I thought this would mean 
they'd be stacked on top of each other, but they're horizontally 
placed (the second two a little bit lower than the first for some 
reason). I'm assuming I'm missing something really obvious, so I'd be 
grateful if anyone could point me in the right direction.

Here's the code:

http://www.adobe.com/2006/mxml"; 
layout="vertical"
initialize="initializeHandler()"
horizontalAlign="left">











Thanks,

Annelie



RE: [flexcoders] Displaying UIComponents vertically

2009-02-05 Thread Alex Harui
Each child of VBox must report have either its measuredWidth/Height or 
explicitWidth/Height set, otherwise the VBox doesn't know how big they are

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of annelie2008
Sent: Thursday, February 05, 2009 4:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Displaying UIComponents vertically


Hi,

I'm having trouble with the layout of the musical score I'm
displaying. It's generated from an xml file and I want the staves to
be placed on top of each other but I can't make it work. I have a
class which draws out the lines and the notes on it, so I instantiate
that class, create the lines and notes, then create a UIComponent to
add it to. There's three staves, so I do this for all three, then I
add them all to a VBox which I display. I thought this would mean
they'd be stacked on top of each other, but they're horizontally
placed (the second two a little bit lower than the first for some
reason). I'm assuming I'm missing something really obvious, so I'd be
grateful if anyone could point me in the right direction.

Here's the code:

http://www.adobe.com/2006/mxml";
layout="vertical"
initialize="initializeHandler()"
horizontalAlign="left">









Thanks,

Annelie