views:

485

answers:

1

I have a LinkBar which is linked to a viewstack. However, as I change the fontsize of my LinkBar, when I run it, the font size does not change at all! I've tried changing the font using CSS and it doesnt change the font size! Any ideas? Here is the code:

<mx:Canvas x="0" y="0" width="30%" height="100%">
 <mx:Label x="10" y="10" text="Help" fontSize="20"/>
 <mx:LinkBar x="10" y="49" dataProvider="viewstack1" 
    direction="vertical" width="175" height="276" 
    selectedIndex="0"
    fontSize="30">
 </mx:LinkBar>
</mx:Canvas>

How can I change the font size?! This is driving me crazy.

A: 

Either you can change the fontSize in a CSS class, and add that class as the value for the "linkButtonStyleName" style, or you can iterate through all the LinkButtons that have been created in the LinkBar and set the style manually (e.g., in AS3 code).

That being said, fontSize is supposed to be inherited so I'm not sure why your code doesn't work. Just providing some options.

Glenn
If I would "edit" the answer, I found out the problem was that there was a CSS style set for LinkButtons, and once I changed the font for that, the items in the LinkBar changed font to what I set it at. Very frustrating! However, thanks for telling me that LinkButtons were the "children" of LinkBar's.
Seidleroni