dojo标签栏以编程方式创建但未固定在正确的位置 [英] dojo tabbar programatically created but not fixed at the right position

查看:175
本文介绍了dojo标签栏以编程方式创建但未固定在正确的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以编程方式创建了一个dojo标签栏,并设置了固定的底部属性,但在现有文档下方创建了标签栏,而不是固定在窗口的底部。在我完成了另一个视图之后,将其固定在底部正确。



我这样做了:

  function createTabbar(){
var tabBar = new dojox.mobile.TabBar({id:tabContainer,barType:tabBar,fixed:bottom}) placeAt(dijit.byId( 的MobileView));
var tabBarButtonNodes = new dojox.mobile.TabBarButton({label:Knoten,id:tabBarButtonNodes,moveTo:divNodes0,icon1:img / nodes_60.png,icon2:img / nodes_60。 PNG})placeAt(tabBar.domNode)。
var tabBarButtonInfo = new dojox.mobile.TabBarButton({label:Info,id:tabBarButtonInfo,moveTo:divInfo,icon1:img / info_60.png,icon2:img / info_60。 PNG})placeAt(tabBar.domNode)。
var tabBarButtonLogin = new dojox.mobile.TabBarButton({label:Login,id:tabBarButtonLogin,moveTo:divLogin,icon1:img / login_60.png,icon2:img / login_60。 PNG})placeAt(tabBar.domNode)。
var teest = dijit.byId(divInfo);
tabBar.resize();
}

我必须调整大小吗?


如下所述,固定标志仅适用于dojox / mobile / ScrollableView。有两种情况:在整个应用程序级别的页眉/页脚,以及本地在给定的ScrollableView的级别。您可以在这里找到详细信息:





对于本地情况,您可以使用ScrollableView.addFixedBar方法添加固定栏。例如,请参阅dojox / mobile / tests / test_dynamic-ScrollableView-vh-vf.html。



希望这有帮助,
Adrian


i created a dojo tabbar programmatically and set the fixed:"bottom" attribute but the tabbar is created below the existing document and not fixed at the bottom of the window. After i have done a performeTransition to another view its fixed at bottom correctly.

i did it like this:

        function createTabbar() {   
        var tabBar = new dojox.mobile.TabBar({id:"tabContainer", barType : "tabBar", fixed: "bottom"}).placeAt(dijit.byId("mobileView")); 
        var tabBarButtonNodes = new dojox.mobile.TabBarButton({label:"Knoten", id:"tabBarButtonNodes", moveTo:"divNodes0", icon1 : "img/nodes_60.png", icon2 : "img/nodes_60.png"}).placeAt(tabBar.domNode); 
        var tabBarButtonInfo = new dojox.mobile.TabBarButton({label:"Info", id:"tabBarButtonInfo", moveTo:"divInfo", icon1 : "img/info_60.png", icon2 : "img/info_60.png"}).placeAt(tabBar.domNode); 
        var tabBarButtonLogin = new dojox.mobile.TabBarButton({label:"Login", id:"tabBarButtonLogin", moveTo:"divLogin", icon1 : "img/login_60.png", icon2 : "img/login_60.png"}).placeAt(tabBar.domNode); 
        var teest = dijit.byId("divInfo");
        tabBar.resize();
        }

do i have to resize anything else?

解决方案

As documented, the "fixed" flag matters for dojox/mobile/ScrollableView only. There are two cases: a header/footer at the level of the entire application, and locally at the level of a given ScrollableView. You can find details here:

For the local case, you can add the fixed bar using the method ScrollableView.addFixedBar. For an example, see dojox/mobile/tests/test_dynamic-ScrollableView-vh-vf.html.

Hope this helps, Adrian

这篇关于dojo标签栏以编程方式创建但未固定在正确的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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