CLiown
CLiown

Reputation: 13843

Flex 3.5 style individual buttons

If I have a button named:

<mx:Button id="backButton">

and another named:

<mx:Button id="cancelButton"

How can I style each button seperatly?

Can I give each button a style, then set the style in CSS... E.g.

Button #style {
  backgroundColor: red;
}

Upvotes: 0

Views: 213

Answers (1)

Constantiner
Constantiner

Reputation: 14221

In CSS:

.firstButton {
  backgroundColor: red;
}

.secondButton {
  backgroundColor: blue;
}

Buttons:

<mx:Button id="backButton" styleName="firstButton" />

<mx:Button id="cancelButton" styleName="secondButton" />

Upvotes: 2

Related Questions