Flex移动tabBar调整宽度?

时间:2011-08-31 23:17:50

标签: flex flex4 flexbuilder flex4.5

如何更改tabBar高度大小?

enter image description here

是否可以申请我的所有观点。感谢

2 个答案:

答案 0 :(得分:2)

是的,你可以:

<?xml version="1.0" encoding="utf-8"?>
<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                                  xmlns:s="library://ns.adobe.com/flex/spark"
                                  initialize="tabbedviewnavigatorapplication1_initializeHandler(event)">
    <fx:Script>
        <![CDATA[
            import mx.core.FlexGlobals;
            import mx.events.FlexEvent;

            protected function tabbedviewnavigatorapplication1_initializeHandler(event:FlexEvent):void
            {
                // TODO Auto-generated method stub
                FlexGlobals.topLevelApplication.tabbedNavigator.tabBar.height = 15;
            }

        ]]>
    </fx:Script>
    <s:ViewNavigator label="Home" width="100%" height="100%" firstView="views.HomeView"/>
    <s:ViewNavigator label="Page" width="100%" height="100%" firstView="views.PageView"/>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</s:TabbedViewNavigatorApplication>

我希望你的意思是真正的高度,而不是每个标签项的宽度。

答案 1 :(得分:0)

使用tabBarheight

tabBar.height = newValue

或者你的问题还有更多吗?