0

I wish to skin MenuBar, and change it's itemSkin to something else, like different background color for each menu item.

  • Is it possible ?
Yordan Yanakiev
  • 2,546
  • 3
  • 39
  • 88
  • Yes it's possible, but I wouldn't go down that road. If you want to skin, you're better of with Spark components. You can usually recreate the behavior of mx components quite easily with the existing Spark components (except Tree and ADG) – RIAstar Jun 27 '11 at 09:20
  • good, can you link me then the Spark MenuBar, because i dont see it arround :D Now seriously : what class then i shall use in order to replace MenuBar ? – Yordan Yanakiev Jun 27 '11 at 11:00
  • It doesn't exist out of the box, but you can create a menu with a ButtonBar or a List for the main menu and a List in a PopUpAnchor for the submenus. – RIAstar Jun 27 '11 at 12:55
  • nah.. this neither will do the work, neither will be even close to the rest of the look and feel :| – Yordan Yanakiev Jun 27 '11 at 13:00
  • It does the work for me and since they're Spark components, you can give them any look and feel you wish for. (It becomes more complex if you want multi-level menus though, but I consider that a sign of poor UI design anyway) – RIAstar Jun 27 '11 at 13:50
  • could be, could be, but this is not mine design, it's the boss ... :E so i need to fight my way trough it , you know ... "the gods orders" :D – Yordan Yanakiev Jun 27 '11 at 13:54
  • Well, then you should tell him that either you'll have to (try to) skin mx:MenuBar or you'll have to create your own Spark version of it; both of which will take a up lot of time. – RIAstar Jun 27 '11 at 14:03
  • Nah. I dont wana commit suicide, i am still young ... :D Better wait for another solution. Specifically with MenuBar. – Yordan Yanakiev Jun 27 '11 at 14:07
  • That's a pretty good argument ;) But be prepared for "Why did it take you so long?" If you don't warn him now, you won't be able to say "I told you so", because you didn't. – RIAstar Jun 27 '11 at 14:27
  • :D better receive a of thoose : "I told you so" :D – Yordan Yanakiev Jun 29 '11 at 16:04

1 Answers1

0

I found the solution

the main idea is to create a class overriding MenuBarItem. Then - about the background - i have create one Image to store the color, and i switched it's position with the label of the menu item.

So far it is sufficiently good solution. :)

Yordan Yanakiev
  • 2,546
  • 3
  • 39
  • 88