Ext.Net 1.x_Ext.Net.TabPanel基本用法

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BasicSet.aspx.cs" Inherits="AutoOffice_ZEQuo_BasicSet" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>基础设置</title>
    <script type="text/javascript">
        var addTab = function (tabPanel, id, url,title) {
            var tab = tabPanel.getComponent(id);
            if (!tab) {
                tab = tabPanel.add({
                    id: id,
                    title: title,
                    closable: true,
                    autoLoad: {
                        showMask: true,
                        url: url,
                        mode: "iframe",
                        maskMsg: "Loading " + url + "..."
                    }
                });

                tab.on("activate", function () {
                    var item = MenuPanel1.menu.items.get(id + "_item");

                    if (item) {
                        MenuPanel1.setSelection(item);
                    }
                }, this);
            }

            tabPanel.setActiveTab(tab);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport runat="server">
        <Items>
        <ext:Window ID="Window1" 
            runat="server" 
            Title="电子报价系统基础设置"
            Width="1024" 
            Height="768" 
            Icon="Link" 
            Layout="border" 
            Maximizable="true"
            Maximized="true" >
            <Items>
                <ext:MenuPanel ID="MenuPanel1" runat="server" Width="200" Region="West">
                    <Menu ID="Menu1" runat="server">
                        <Items>
                            <ext:MenuItem ID="MenuItem1" runat="server" Text="产品型号管理">
                                <Listeners>
                                    <Click Handler="addTab(#{TabPanel1}, 'idCpxh', 'Quo_Module.aspx','产品型号管理');" />
                                </Listeners>
                            </ext:MenuItem>
                            <ext:MenuSeparator />
                            <ext:MenuItem ID="MenuItem2" runat="server" Text="背光型号管理">
                                <Listeners>
                                    <Click Handler="addTab(#{TabPanel1}, 'idBgxh', 'Quo_BLmodule.aspx','背光型号管理');" />
                                </Listeners>
                            </ext:MenuItem>
                            
                            <ext:MenuSeparator />
                            
                            <ext:MenuItem ID="MenuItem3" runat="server" Text="STN取模参数">
                                <Listeners>
                                    <Click Handler="addTab(#{TabPanel1}, 'idStnqm', 'Quo_GetModuleSTN.aspx','STN取模参数');" />
                                </Listeners>
                            </ext:MenuItem>
                            <ext:MenuSeparator />

                            <ext:MenuItem ID="MenuItem5" runat="server" Text="TN取模参数">
                                <Listeners>
                                    <Click Handler="addTab(#{TabPanel1}, 'idTnqm', 'Quo_GetModuleTN.aspx','TN取模参数');" />
                                </Listeners>
                            </ext:MenuItem>
                            <ext:MenuSeparator />

                            <ext:MenuItem ID="MenuItem4" runat="server" Text="产品大类配置">
                                <Listeners>
                                    <Click Handler="addTab(#{TabPanel1}, 'idCpdl', 'Quo_ProductModel.aspx','产品大类配置');" />
                                </Listeners>
                            </ext:MenuItem>
                            <ext:MenuSeparator />
                        </Items>
                    </Menu>
                </ext:MenuPanel>
                <ext:TabPanel ID="TabPanel1" runat="server" Region="Center" />
            </Items>
        </ext:Window>
        </Items>
</ext:Viewport>

    </form>
</body>
</html>
Ext.Net 1.x_Ext.Net.TabPanel基本用法_第1张图片

你可能感兴趣的:(Ext.Net 1.x_Ext.Net.TabPanel基本用法)