如何将多个图标添加到Spark TabBar控件? [英] How can I add multiple icons to the Spark TabBar control?
问题描述
在MX TabBar组件中,iconField属性允许我们在每个选项卡中显示不同的图标。在Spark中,似乎没有将图标添加到TabBar的固有方式。有没有人有一个实现图标支持Spark的TabBar的例子?有没有办法做到这一点,而不扩展组件?
非常感谢!
您不需要创建自定义组件,只需通过数据传递图标和标签即可。
http://cookbooks.adobe.com/post_Tutorials_for_skinning_Spark_ButtonBar_component_w-16722.html
就我个人而言,我用tabbar / viewstack使用内容导航器,我把图标作为图标而不是imageicon。您可以相应地进行更改。
In the MX TabBar component, the iconField property allowed us to display different icons in each tab. In Spark, there does not seem to be an inherent way to add icons to the TabBar. Does anyone have an example of implementing icon support for Spark's TabBar? Is there a way to do this without extending the component?
Many thanks!
Hey after spending a week trying to follow multiple ways, (yours being top of the list) i found out a simpler and effective way to add icons to my tab bar, or any other component using skinning.
You dont need to create a custom component, just passing the icon and label through data.
http://cookbooks.adobe.com/post_Tutorials_for_skinning_Spark_ButtonBar_component_w-16722.html
As personally, i was using content navigator with my tabbar/viewstack, i passed the icon as icon instead of imageicon. you can make changes accordingly.
这篇关于如何将多个图标添加到Spark TabBar控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!