Yeti
Yeti

Reputation: 5518

Change icon of Alert buttons

How do I change the icons to Alert buttons like OK, CANCEL etc?

Upvotes: 0

Views: 459

Answers (3)

Geirr Winnem
Geirr Winnem

Reputation: 1

You can find a complete source code and application example here

Upvotes: 0

Wade Mueller
Wade Mueller

Reputation: 6059

If you look at the source code for Alert there really isn't a lot there once you get past the comments and properties. What I've done in the past is to just copy the Alert class and modify my custom version however I see fit. That way you don't have to deal with the mx_internal stuff. If you are using Flex 4, there is no spark version of Alert, so another thing you can do is create your own spark version, which will give you even more control over skinning your alerts using skins etc. Sounds like a big deal, but it's actually much easier than you'd think (speaking from experience here.)

Upvotes: 2

Raul Agrait
Raul Agrait

Reputation: 6018

Just specify the iconClass paremeter of the Alert class. A detailed example can be found here.

Upvotes: 0

Related Questions