Yes, I meant the button's border. The default button is a gradient background with a border around it. I just wanted a gradient. No border.
What I ended up doing was to create a PNG that had a gradient using the colors I wanted, created a Button subclass (in MXML) called GreenButton, set styleName to "greenButton", and then defined greenButton inside a <Style> tag. In the greenButton style I set the upSkin property to use my PNG and provided 9-slice values and also set the text color. This approach allows me to reuse GreenButton and set the label and width (among other things) inline. The drawbacks, however, are that I will need to create separate images for downSkin, disabledSkin, etc. for each and every custom button I need, like RedButton, etc. So all in all it is a fairly simple and tolerable workaround, it just peeves me that I can't say borderStyle: none. In my opinion, if a component has a border you should be able to turn it off. Its just an if statement. Ben --- In [email protected], "Andrew Trice" <[EMAIL PROTECTED]> wrote: > > That's how I interpreted it: that he is actually talking about the > button's border. Ben, is that what you were talking about? If so, the > skin method is the way to go. > > > > -Andy > > > > _____________________________________ > > Andrew Trice > > Cynergy Systems, Inc. > > http://www.cynergysystems.com > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > > Email: [EMAIL PROTECTED] > > Office: 866-CYNERGY > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Michael Schmalle > Sent: Wednesday, November 29, 2006 11:50 AM > To: [email protected] > Subject: Re: [flexcoders] Styling in Flex is officially ridiculous > > > > Oh yeah... > > If he is talking about the actual button border, that is the skin and he > needs to create a new skin. The button does not have borders, it has > skins. It dosn't even share the same characteristics of a Container that > has a border. These are not the same things. > > So, Ben, what do you mean when you say the Button's border? Or, what do > you want... > > Peace, Mike > > On 11/29/06, Michael Schmalle < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > wrote: > > Andy, > > It answers his question and it does work. > > If the label is present, you click on the label and the Button functions > correctly. > > I don't know what he is aiming for here but, if you 'don't' have a > border, there is no other hit area specified for the component. So, how > are you going to get mouse events from a component that dosn't have a > hit area? > > Bottom line is, this approach does work if you plan to use a label, > other than this, why would you want a button without a label and border > if you want to click on it? > > Peace, Mike > > On 11/29/06, Andrew Trice <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > wrote: > > I'm not sure that approach really works... The buttons don't show up at > all. > > > > -Andy > > > > _____________________________________ > > Andrew Trice > > Cynergy Systems, Inc. > > http://www.cynergysystems.com <http://www.cynergysystems.com> > > > > Blog: http://www.cynergysystems.com/blogs/page/andrewtrice > <http://www.cynergysystems.com/blogs/page/andrewtrice> > > Email: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > Office: 866-CYNERGY > > > > ________________________________ > > From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> ups.com <http://ups.com> ] On Behalf Of > Michael Schmalle > > > Sent: Wednesday, November 29, 2006 11:05 AM > To: [email protected] > Subject: Re: [flexcoders] Styling in Flex is officially ridiculous > > > > Well, > > Before your loose it... > > try > > myButton.setStyle("upSkin", null); > > OR > > Button { > upSkin:ClassReference("null"); > } > > OR > > <mx:Button upSkin="{null}"/> > > Peace, Mike > > On 11/29/06, ben.clinkinbeard <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > wrote: > > OK. I am usually very hesitant to criticize Adobe because of the > immense respect I have for their employees and the amazing technology > they create. I have built my career around their products. That being > said, the styling capabilities in Flex are downright silly. I have > suffered silently through some small, yet extremely annoying > "nuances", but this one takes the cake: You can't style a Button to > not have a border!!! > > Developer: "Hey button, go ahead and skip your border drawing routine." > Button: "Eff that! I love my borders and I ain't getting rid of them > for anyone!" > > WTF. I can understand not supporting some styling features people > would like, but not supporting one that is just turning something off? > What gives? I realize I could probably subclass Button and override > the drawing but that is uber-overkill for something that should be a > simple attribute. > > If someone from Adobe can offer a valid reason for why this isn't > supported I would love to hear it. I would also be very interested to > know if styling is an area that is being focused on for significant > upgrades in future versions. > > Thanks, > Ben > > > > > -- > Teoti Graphix > http://www.teotigraphix.com <http://www.teotigraphix.com> > > Blog - Flex2Components > http://www.flex2components.com <http://www.flex2components.com> > > You can find more by solving the problem then by 'asking the question'. > > > > > -- > Teoti Graphix > http://www.teotigraphix.com <http://www.teotigraphix.com> > > Blog - Flex2Components > http://www.flex2components.com <http://www.flex2components.com> > > You can find more by solving the problem then by 'asking the question'. > > > > > -- > Teoti Graphix > http://www.teotigraphix.com <http://www.teotigraphix.com> > > Blog - Flex2Components > http://www.flex2components.com <http://www.flex2components.com> > > You can find more by solving the problem then by 'asking the question'. >

