Domanda

I am upgrading a flex 3 app to flex 4.

I notice this code no longer will highlight a tab.

  tab =  Tab(tabBarMap.getChildAt(2))
  tab.setStyle("fillColors", ["red", "white"]);
  tab.setStyle("fillAlphas", [1.0, 1.0]);

I used this to draw attention to the tab once an Instant message was received. How can i do the same in flex 4?

I don't mind if it is changing the tab colour, changing the tab icon or adding an iOS like red bubble. Anything to draw attention.

Cheers

ANSWER

tab.setStyle("chromeColor", "#CCCCCC");
È stato utile?

Soluzione

Found what could be a solution to your problem here

Basically it says you can retrieve children from your TabBar as Button, since Tab extends it. Using Button instead may help although I'm not sure why applying these styles would not work on the Tab itself. On one of my project, I've been using .setStyle on "chromeColor" to apply the connected user's color on some of my app's button.

You could also be using CSS and states to accomplish this, but maybe it won't be necessary for basic styling.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top