tags:

views:

197

answers:

1

hi,

how can I completely remove button effects from a Button component in Flex ?

Background, Fill and border are completely white. But still I've a black shadow around the button (see picture bloew):

http://dl.dropbox.com/u/72686/button.png

thanks

Button {

    fillAlphas: 1.0, 1.0, 1.0, 1.0;
    fillColors: #FFFFFF, #FFFFFF;
    themeColor: #FFFFFF;
    borderColor: #FFFFFF;
    cornerRadius: 0;
    paddingTop: 0;
    paddingLeft: 0;
    paddingRight: 0;
    paddingBottom: 0;
    horizontalGap: 0;
    leading: 0;
    fontWeight: normal;
    color: #000000;
    textSelectedColor: #000000;
    textRollOverColor: #000000;
}
A: 

You should specify the Flex version, since the newly release Flex 4 has a completely different skinning architecture.

Anyhow, I assume this is Flex 3, you could try and set this:

Button {
    skin: ClassReference(null);
}

Not sure it'll work, some components choke on null skins.

If it is Flex 4, I suggest creating a skin class that does what you want, even if it is empty, and setting it like so (note the namespace, s for Spark):

s|Button {
    skin-class: ClassReference('my.empty.Skin');
}

Where my.empty.Skin is the fully qualified class name for your skin.

macke
awesome, it worked. Do you know how could I remove the borders of the slider component as well ? Or change its thickness ? thanks
Patrick
No, I'm not sure unfortunately. Perhaps the Flex 3 Style Explorer can be useful to you:http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.htmlGenerally, skinning the Halo component set (a.k.a. Flex 3 components) is a pain and is probably best avoided. Now that Flex 4 is released, I suggest having a look at the Spark component set instead, if possible.
macke