Coolite (four): FiledSet of container control, Panel and Window

Original link: http://www.cnblogs.com/hendy/archive/2010/04/12/1710379.html
A, FieldSet control
     FieldSet control in the development of usage is very high, after all, Microsoft does not provide Web Group controls are usually carried out using FieldSet forms such as interface layout grouping. In Coolite Toolkit in the expertise to provide such a control, but also for many other additional features properties and methods.
< EXT: the FieldSet ID = "FieldSet1" the runat = "Server" Collapsible = "True" the Height = "200px" the Title = "the FieldSet packet" the Width = "200px" >
< Body >
< Table border = "0" cellpadding = "0 " cellspacing =" 0 " >

TD > Date: </ TD >
< TD >
< EXT: the DateField ID = "DateField2" the runat = "Server" />
</ TD >
</ TR >
</ Table >
</ Body >
</ EXT: the FieldSet >


      the Title , Height and Width these basic properties can not remember, collapsible FieldSet property is used to set a foldable state . The above code snippet travel effect is as follows:
                  
two, Panel Controls
      FieldSet previous analysis of the controls can be used to make a packet interface layout, and make it through the relevant property is set to become more advanced application operations. FieldSet provided in these properties is also the same with respect to the Panel. In ASP.NET there must have also provided the Panel control, so compared to ASP.NET Coolite Toolit provided in the Panel what are the characteristics of it? Oh, characteristics can be more, please read the following ......
       Panel Controls My personal understanding is a container control, I just do not have it and then set it through a html tag runat = "server" can achieve the same equivalent Effect. Panel Coolite Toolkit provided the same is true, but he expanded some common features of ASP.NET basis points in the Panel, including the dynamic setter, fitted a number of other Web features also noodles.
<% - <EXT: Panel ID = "Panel2" the runat = "Server" the Height = "300" the Title = "the Title"> -%>
< EXT: Panel ID = "Panel1" the runat = "Server" the Height = " 300 " the Title =" the Title "     Collapsible =" to true " the Width ="


Body >
</ EXT: Panel >

      with FieldSet control as disclosed directly whether to permit folding property. Html code fragment above, the <body> tag can be placed at the interface need to present an element, in addition it also provides a property (the Html), the property may be provided by which the display contents, as follows:
< EXT : Panel ID = "Panel2" the runat = "Server" the Height = "100" the Title = "the Title"     Collapsible = "to true" the Width = "300" the Html = "<H5> of setting display by HTML attributes </ h5> " > </ EXT: Panel >       when using this control should be noted that, although the <body> tags and attributes can be set Html content controls presented, but there are certain constraints, <body> Html tags and attributes can not be used simultaneously.       By setting the contents of its property to be rendered, control also provides properties to set it to automatically load the data (such as a page




                  
,类似与IFrame的功能)。
< ext:Panel ID ="Panel3" runat ="server" Height ="100" Width ="400" Title ="Title" >
< Body >
</ Body >
</ ext:Panel >
< script type ="text/C#" runat ="server" >
    protected void Page_load(object sender, EventArgs e)
    {
        this.Panel3.AutoLoad.Url =
"http://beniao.cnblogs.com";
        this.Panel3.AutoLoad.NoCache =
true;
    }
</ Script >

< EXT: Panel ID = "Panel3" the runat = "Server" the Height = "125px" the Title = "automatically load the contents of"     the Width = "400px"   Collapsible = "to true" > < Body > </ Body > < , AutoLoad the Url = "http://beniao.cnblogs.com" > </ , AutoLoad > </ EXT: Panel >       in addition to the above implementations, may be () loads a dynamic page presented by the disclosed method LoadContent. protected void Page_load ( Object SENDER,









   
.Panel3.LoadContent ( " http://beniao.cnblogs.com " , to true );
}


      mentioned iframes. , This thing we usually develop in the utilization rate is very high, Coolite Toolkit that certainly will not forget him the existence of the Panel control also provides support iframe, Panel control load an external web page also can be presented in the form of iframe.
protected void Page_load ( Object SENDER, EventArgs E)
{
   
the this .Panel3.AutoLoad.Url = http://beniao.cnblogs.com/ ;
   
The this .Panel3.AutoLoad.Mode = LoadMode.IFrame;
   
the this .Panel3.AutoLoad.NoCache = to true ;
}


      may also be provided in the LoadContent load () method of mode :
the this .Panel3.LoadContent ( new new the LoadConfig ( " HTTP: // beniao.cnblogs.com " , LoadMode.IFrame, to true ));

      in addition to the above characteristics, Coolite Toolkit collapse an expanded function of the Panel has his unique characteristics, by Listeners can set the time allowed to expand to load the specified Web page, when folded to clear the contents.
< EXT: Panel ID = "Panel4," the runat = "Server" the Title = "Expand loaded | cleared folding" the Width = "300"







                  


, Immediately gave me a window pops up, Window controls can be said is designed to address the technology needs.
< EXT: the Window ID = "the Window1" the runat = "Server" Collapsible = "to true" Icon = "the Application"     the Title = "the Title" > < body > </ body > </ EXT: the Window >       dragged from toolbox a Window to control the interface, the default is foldable, closed and with the page is loaded and displayed. By setting ShowOnLoad = "false | true" attribute to display or not when the page is loaded.       When needed can be displayed by calling its client API interface, you can also call the server-side API interface. < EXT: the Window ID = "the Window1" the runat = "Server" Collapsible = "to true"







="Title" ShowOnLoad ="false" >
< body ></ body >
< Listeners >
< Hide Handler ="this.clearContent();" />
</ Listeners >
</ ext:Window >
< ext:Button ID ="btnShowWindow" runat ="server" Text ="显示Window" >
< Listeners >
<%--<Click Handler="#{Window1}.show();"
/>--%>
</ Listeners >
< AjaxEvents >
< The Click the OnEvent = "Show_Window" > </ the Click >
</ AjaxEvents >
</ EXT: the Button >
< Script type = "text / C #" the runat = "Server" >
    protected void Show_Window (Object sneder, AjaxEventArgs E)
    {
        this.Window1 .Show ();
    }
</ Script >

      Window controls I understand he is a container control, but he is more flexible to use than other controls, more powerful, such as dynamic show and hide (show, Hide), can drag pull resistance (Draggable), touch state (the Modal) and the like.
< EXT: the Window ID = "the Window1" the runat = "Server" = "The Application" the Width = "300"     the Draggable = "to false" the Modal = "to true" the Title = "touch state | application example not drag" ShowOnLoad = "to false" > < body >         touch state | application example not drag < br />         is not a drag: the Draggable = "to false" < br />         touch state: the Modal = "to true" < br /> </ body > < the Listeners > < Hide Handler = "this.clearContent ();" /> </Listeners></ext:Window>










< ext:Button ID ="btnShowWindow" runat ="server" Text ="显示Window" >
< Listeners >
<%--<Click Handler="#{Window1}.show();"
/>--%>
</ Listeners >
< AjaxEvents >
< Click OnEvent ="Show_Window" ></ Click >
</ AjaxEvents >
</ ext:Button >
< script type ="text/C#" runat ="server" >
    protected void Show_Window(object sneder, AjaxEventArgs e)
    {
        this.Window1.Show();
        //this.Window1.Hide();
    }
</ script >

Reproduced in: https: //www.cnblogs.com/hendy/archive/2010/04/12/1710379.html

Guess you like

Origin blog.csdn.net/weixin_30772261/article/details/94811444