【问题标题】:Flex mobile tabBar adjust width?Flex移动tabBar调整宽度?
【发布时间】:2011-08-31 23:17:49
【问题描述】:

如何改变tabBar的高度大小?

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

【问题讨论】:

    标签: apache-flex flex4 flexbuilder flex4.5


    【解决方案1】:

    是的,你可以:

    <?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>
    

    我希望您指的是每个选项卡项的真正高度而不是宽度。

    弗兰克

    【讨论】:

      【解决方案2】:

      使用tabBar.height?

      tabBar.height = newValue
      

      或者您的问题还有其他问题吗?

      【讨论】:

      • 我需要导入任何语句吗?反正我不能把它放进去,因为FB没有tabBar。唯一放置它的地方是: 但它是否不起作用并且它说不是移动 - 优化。
      • @jameslcs 您的问题是关于更改 tabBar 的高度。如果您没有以某种方式创建的 tabBar 实例,您将无法做到这一点。您的意思是要问一个不同的问题,例如如何调整 Flex Mobile ActionBar 的大小?或者如何调整 TabbedNavigatorApplication 的标签大小?
      • 抱歉没有说清楚,我已经编辑了我的问题,请参考上面。我想知道如何调整移动 tabBar 的大小?谢谢
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-17
      • 1970-01-01
      • 1970-01-01
      • 2021-10-08
      • 2012-02-13
      • 2011-08-27
      • 1970-01-01
      相关资源
      最近更新 更多