flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: how to pad text in mx:MenuBar?
Date Thu, 16 Jun 2016 04:43:06 GMT
I just spent a few minutes looking through the source and I don't see a
way to control it.  In MenuBarItem it appears to always center the
UITextField that is the label.  You could try subclassing MenuBar,
override updateDisplayList, call super.updateDisplayList, then loop
through the children and change their y values.

HTH,
-Alex

On 6/15/16, 6:41 PM, "modjklist@comcast.net" <modjklist@comcast.net> wrote:

>I'm using mx:MenuBar with Flex 4.12 SDK, and having trouble figuring out
>how to shift the menu text down a few pixels.
>
>Ideally this would be a paddingTop adjustment so only the text shifts.
>
>The text in question is what appears just looking the menu bar, without
>clicking, hovering, etc. over it with a mouse. It's the text that after
>you click it, it opens up a menu below it (note: the text I want to shift
>is the one you click on, not the text that appears after you click it).
>
>I don't want to change the margin of the menu bar.
>
>So far, I've tried
>
>
>
><fx:Style> 
>.menuStyle{ 
>paddingTop:3; 
>} 
></fx:Style> 
>
>
>
>
>but this deals with the items that appear after you click the menu bar.
>How to adjust the text of the menu bar itself?
>
>
>
>
>I also tried CSS changes but didn't find anything that effected MenuBar.
>
>
>
>
>mx|MenuBar { 
>
>paddingTop:3; 
>
>} 
>
>
>
>
>mx|List { 
>
>paddingTop:3; 
>
>} 
>
>
>
>
>Any hints very much appreciated. Thanks in advance. 

Mime
View raw message