protected void AddTab(TabPanel theTabPanel, string title) { Ext.Net.Panel panel = new Ext.Net.Panel { Title = title, Icon = Ext.Net.Icon.Application, Closable = false, Layout = "Fit", Loader = new ComponentLoader { Mode = LoadMode.Frame, Url = "Patient_detail.aspx?personid=" + patient_id.Text + "&patient_name=" + patient_name.Text + "&machine_type=" + machine_type.Text + "&floor=" + floor.Text + "&area=" + area.Text + "&time=" + time.Text + "&bedno=" + bedno.Text + "&daytyp=" + daytyp.Text + "&sdate=" + toDay } }; theTabPanel.Add(panel); panel.Render(); }
public static void Execute (Atom parent) { var d = new Div ("bs-docs-example"); var top = new TabPanel (new TabPanelOptions{ TabsPosition="top", Bordered=true, }); top.Content.Style.MinHeight = "100px"; var t1 = new Tab (); t1.Caption="First Tab"; t1.Body.Append ("Firs tab body"); AlertFn.Success (t1.Body.FirstChild, "Cayita is awesome"); top.Add (t1); top.Add (tab=>{ tab.Caption= "Second Tab"; tab.Body.AddClass("well"); tab.Body.Append("Hello second tab"); tab.Body.Style.Color="red"; }); top.Add (tab=>{ tab.Caption= "El Coyote"; tab.Body.Append( new Div(cd=>{ cd.ClassName="span1"; cd.Append( new Image{Src="img/coyote.jpg"}); })); tab.Body.Append( new Div(cd=>{ cd.ClassName="span11"; cd.Append( CoyoteText); })); }); d.Append (top); parent.JQuery.Append ("Tabs on top".Header(3)).Append(d); var right = new TabPanel (new TabPanelOptions{ TabsPosition="right", }, pn=>{ pn.Add( tab=>{ tab.Caption="First tab"; tab.Body.Append("Hello first tab".Header(3)); }); pn.Add( tab=>{ tab.Caption= "Second tab"; tab.Body.AddClass("well"); tab.Body.Append("Hello second tab"); tab.Body.Style.Color="blue"; tab.Body.Style.Height="80px"; }); pn.Add( tab=>{ tab.Caption= "El Coyote"; tab.Body.Append( new Div(cd=>{ cd.ClassName="span1"; cd.Append( new Image{Src="img/coyote.jpg"}); })); tab.Body.Append( new Div(cd=>{ cd.ClassName="span11"; cd.Append( CoyoteText); })); }); }); new Div (ex=>{ ex.ClassName="bs-docs-example"; ex.Append(right); parent.JQuery.Append ("Tabs on right".Header(3)).Append(ex); }); right.Show (2); var bottom = new TabPanel (new TabPanelOptions{ TabsPosition="below", }, pn=>{ pn.Add( tab=>{ tab.Caption="First tab"; tab.Body.Append("Hello first tab".Header(3)); }); pn.Add( tab=>{ tab.Caption= "Second tab"; tab.Body.AddClass("well"); tab.Body.Append("Hello second tab"); tab.Body.Style.Color="blue"; tab.Body.Style.Height="80px"; }); pn.Add( tab=>{ tab.Caption= "El Coyote"; tab.Body.Append( new Div(cd=>{ cd.ClassName="span1"; cd.Append( new Image{Src="img/coyote.jpg"}); })); tab.Body.Append( new Div(cd=>{ cd.ClassName="span11"; cd.Append( CoyoteText); })); }); }); bottom.Content.Style.MinHeight = "150px"; new Div (ex=>{ ex.ClassName="bs-docs-example"; ex.Append(bottom); parent.JQuery.Append ("Tabs on bottom".Header(3)).Append(ex); }); bottom.Show (1); var left = new TabPanel (new TabPanelOptions{ TabsPosition="left", Bordered=true }, pn=>{ pn.Add( tab=>{ tab.Caption="First tab"; tab.Body.Append("Hello first tab".Header(3)); }); pn.Add( tab=>{ tab.Caption= "Second tab"; tab.Body.AddClass("well"); tab.Body.Append("Hello second tab"); tab.Body.Style.Color="blue"; tab.Body.Style.Height="80px"; }); pn.Add( tab=>{ new Image(tab, i=>{i.Src="img/coyote.jpg"; i.Style.Height="106px";}); new Label(tab, "El Coyote"); tab.Body.Append(CoyoteText); }); }); left.Content.Style.MinHeight = "220px"; new Div (ex=>{ ex.ClassName="bs-docs-example"; ex.Append(left); parent.JQuery.Append ("Tabs on left".Header(3)).Append(ex); }); left.Show (0); parent.Append ("C# code".Header(3)); var rq =jQuery.GetData<string> ("code/demotabpanel.html"); rq.Done (s=> { var code=new Div(); code.InnerHTML= s; parent.Append(code); }); }