Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 当有几个选项卡时,如何关注第一个选项卡 var tabs=Ext.widget('tabpanel'{ renderTo:'选项卡', 是的, enableTabScroll:true, 宽度:600, 身高:250, 默认值:{ autoScroll:是的, 车身衬垫:10 }, 项目:[{ 标题:“表1003”, iconCls:“选项卡”, //参考:'http://www.yahoo.com', //hrefTarget:“你自己”, html:“”, closable:是的, focusOnToFront:正确 }],........................._Extjs_Extjs4 - Fatal编程技术网

Extjs 当有几个选项卡时,如何关注第一个选项卡 var tabs=Ext.widget('tabpanel'{ renderTo:'选项卡', 是的, enableTabScroll:true, 宽度:600, 身高:250, 默认值:{ autoScroll:是的, 车身衬垫:10 }, 项目:[{ 标题:“表1003”, iconCls:“选项卡”, //参考:'http://www.yahoo.com', //hrefTarget:“你自己”, html:“”, closable:是的, focusOnToFront:正确 }],.........................

Extjs 当有几个选项卡时,如何关注第一个选项卡 var tabs=Ext.widget('tabpanel'{ renderTo:'选项卡', 是的, enableTabScroll:true, 宽度:600, 身高:250, 默认值:{ autoScroll:是的, 车身衬垫:10 }, 项目:[{ 标题:“表1003”, iconCls:“选项卡”, //参考:'http://www.yahoo.com', //hrefTarget:“你自己”, html:“”, closable:是的, focusOnToFront:正确 }],.........................,extjs,extjs4,Extjs,Extjs4,当有几个选项卡时,如何关注第一个选项卡? 我使用的是focusOnToFront,但它不起作用。看到您已经在变量tabs中定义了tabpanel,如果要使第一个选项卡可见,最简单的方法是: var tabs = Ext.widget('tabpanel', { renderTo: 'tabs', resizeTabs: true, enableTabScroll: true, width: 600, height:

当有几个选项卡时,如何关注第一个选项卡?
我使用的是focusOnToFront,但它不起作用。

看到您已经在变量
tabs
中定义了tabpanel,如果要使第一个选项卡可见,最简单的方法是:

 var tabs = Ext.widget('tabpanel', {
        renderTo: 'tabs',
        resizeTabs: true,
        enableTabScroll: true,
        width: 600,
        height: 250,
        defaults: {
            autoScroll: true,
            bodyPadding: 10
        },
        items: [{
            title: 'Tab 1003',
            iconCls: 'tabs',
            //ref:'http://www.yahoo.com',
            //hrefTarget:'_self',
            html: '<div style="width:100%; height:100%; background-color:#cccccc;"><iframe src="http://www.w3schools.com" frameborder=0  style="width:100%; height:100%;"></iframe></div>',
            closable: true,
            focusOnToFront  : true
        }],.........................

如文档所述。

添加
activeTab
属性:

tabs.setActiveTab(0);

你说的“焦点”是什么意思?那么它是活动的吗?你看过
tabpanel
activeTab
属性了吗?
var tabs = Ext.widget('tabpanel', {  
    activeTab: 0,
    ...