Sorry about the typos in my previous post -- here is corrected code
snippet:
public class MyButton extends Button
{
override protected function updateDisplayList
(w:Number, h:Number):void
{
super.updateDisplayList(w,h);
// position label 10 px from top
textField.y = 10;
}
}
--- In [email protected], "jaywood58" <[EMAIL PROTECTED]> wrote:
>
> I'm replying to this very old post, but thought someone might
> still find it helpful. My solution is not *exactly" easy, but seems
> simpler than having to define a new theme and tinker with
> programmatic skinning.
>
> I had a custom class that extends Button, where I wanted the labels
> to be placed a fixed position from the top, versus the default of
> auto-centered. The solution was to override updateDisplayList and
set
> the y-value of textField, a protected var in Button where the label
> is rendered.
>
> Ex:
> public class MyButton extends Button
> {
> override protected function updateDisplayList(u:Number,
w:Number)
> {
> super.updateDisplayList(w,h);
> // position label 10 px from top
> textField.y = 10;
> }
> }
>
> --- In [email protected], "rockmoyosa" <rockmoyosa@>
> wrote:
> >
> > Ok ok , I got de icon in my Button,but...
> > I resized the button to height = 17 and my label has a font-size
of
> 10.
> > but the effect is thathalf of my text is visble. So I want the
> > following:
> >
> > Or I can position my text with x and y
> > or an marginTop = X(something).
> >
> > I find no standard solution in Flex?! Anybody!
> >
>