Just make the labels same height, and tuning its own padding. 
I think it is sort of tricky, but Flex still can't make text alignment perfect 
automatically, and you do always have to spend much effort to get over this.

<mx:HBox>
        <mx:Label height="100%" text="LABEL1" fontSize="10" paddingTop = "2"/>
        <mx:Label height="100%" text="LABEL2" fontSize="12" paddingTop = "0"/>
</mx:HBox>
  ----- Original Message ----- 
  From: Alexander Tarelkin 
  To: [email protected] 
  Sent: Saturday, September 05, 2009 2:38 AM
  Subject: [flexcoders] Position elements with different font size against 
baseline in HBox


    Hello, flexcoders.



  Let's pretend I have the following code:


  <mx:HBox>
        <mx:Label text="LABEL1" fontSize="10"/>
        <mx:Label text="LABEL2" fontSize="12"/>
  </mx:HBox>


  What should I do to vertically position the buttons on the same baseline 
without using padding? Referencing some constraint row from outside the HBox 
does not work, since HBox   abolishes absolute positioning.


  Thank you,
  Alexander Tarelkin













  

Reply via email to