如何将多个图标添加到Spark TabBar控件? [英] How can I add multiple icons to the Spark TabBar control?

查看:135
本文介绍了如何将多个图标添加到Spark TabBar控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆