ExtJs2.0 Learning Series (9) The first type of--ext.tabpanel

Source: Internet
Author: User

Hello everybody, then introduce the foundation of ExtJS, TabPanel component everybody likes it!

(Temporary home 2 hours.)

As usual, look at the simplest first, and then elaborate on the details later!

Effect Picture:

JS Code:

Ext.onready (function () {
var tabsdemo=new ext.tabpanel ({
RenderTo:Ext.getBody (),
WIDTH:300,
activetab:0,//Current Activation tab
Frame:true,
items:[{
Contentel: "TabOne",//tab page element ID (add what you want to show)
Title: "The Wave of the Sunrise",
closable:true//whether the button is realistic to turn off the default is False
},{
Contentel: "Tabtwo",
Title: "How are the brothers in the blog park?"
}]
});
});

HTML code:

<body style= "margin:10px;" >
<div>
<div id= "TabOne" class= "X-hide-display" >i am tabone!</div>
<div id= "Tabtwo" class= "X-hide-display" >i am tabtwo!</div>
</div>
</body>
<!--note class type, set to X-hide-display for normal display-->

Here are some examples of arguments:

//几个相关参数
1.tabPosition:"bottom"//选项卡的位置,枚举值bottom,top.默认为top(只有top的时候才能选项卡的滚动!)
2.tabTip:"提示"//必须先调用Ext.QuickTips.init();才有效果

Often we have a situation where a tab loads a page, and here I provide a simple method that is not very good but stable (no problem has been validated in the project).

is: Use the IFRAME as tab content.

1. TabPanel with an IFRAME to load other complete pages.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.