flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evyatar Ben Halevi-Arbib <evyata...@gmail.com>
Subject Re: Spark Button textAlign
Date Tue, 17 Dec 2013 20:14:16 GMT
When you create a new skin (at least in Flash Builder) you can start by
creating a copy of the default skin.
Just do that and on the Label MXML tag itself set the textAlign property to
left.

Good luck,
Evyatar


On Tue, Dec 17, 2013 at 7:41 PM, Sumudu Chinthaka <csumudu@gmail.com> wrote:

> i have created a skin class that extends spark.skins.mobile.ButtonSkin
> and set textAlign to be left in createChildren method but it does not work
>
> package skins
> {
> import spark.skins.mobile.ButtonSkin;
>  public class MyButtonSkin extends ButtonSkin
> {
> public function MyButtonSkin()
> {
> super();
> }
>  override protected function createChildren():void
> {
> super.createChildren();
>  labelDisplay.setStyle('textAlign','left');
> }
>  }
> }
>
>
> On Tue, Dec 17, 2013 at 7:31 PM, Maurice Amsellem <
> maurice.amsellem@systar.com> wrote:
>
> > What do you mean by custom skin?
> > 1) Default skin customized through css styles (eg. textAlign)?
> > 2) Completely new skin class ?
> >
> > Maurice
> >
> > -----Message d'origine-----
> > De : Sumudu Chinthaka [mailto:csumudu@gmail.com]
> > Envoyé : mardi 17 décembre 2013 14:45
> > À : users@flex.apache.org
> > Objet : Spark Button textAlign
> >
> > Hi All
> >
> > I want to crate a custom skin for a Spark button with textAlign to be set
> > to "left", but i found out there is a restriction set in Button class
> that
> > prevent accepting textAlign values
> >
> > is there any way to override [Exclude(name="textAlign", kind="style")]
> > setting in Button subclass so that i can set this through css
> >
> > or is there any alternative way to achieve this
> >
> > Thanks
> > Sumudu
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message