Create my own Coolite.Ext.Web.Component

  1. #1

    Create my own Coolite.Ext.Web.Component

    Hi,

    In my web-site, I have a RowLayout that consists of 3 LayoutRows. In each LayoutRow I have a Coolite component (Panel, GridPanel, TabPanel), in the following form:

    <ext:RowLayout ID="RowLayout2" runat="server">
     <ext:LayoutRow>
      <ext:Panel runat="server" id="myPanel">
       <Body>
        <!-- Lots of panel stuff ... -->
        ...
     </ext:LayoutRow>
     <ext:LayoutRow>
      <ext:GridPanel ID="myGridPanel" runat="server">
       <!-- Lots of grid panel stuff ... -->
       ...
     </ext:LayoutRow>
     <ext:LayoutRow>
      <ext:TabPanel ID="myTabPanel" runat="server">
       <Tabs>
        <!-- Lots of tab panel stuff ... -->
        ...
     </ext:LayoutRow>
    </ext:RowLayout>
    I want to encapsulate each one of the components (myPanel, myTabPanel, myGridPanel) in a separate user-control (or something similar) instead of having all of the code in the same file.
    - Only Coolite.Ext.Web.Components are allowed inside a LayoutRow and I couldn't inherit this class.
    - When putting an ext:Panel inside each LayoutRow and putting the components inside each ext:Panel's body - I couldn't control well the height and width of the components (they didn't fit themselves to the maximum height and width that was available for them inside the panel).

    Is there a way to create Coolite.Ext.Web.Components of my own?
    Is there a way to make the Panel's body components to fit to the whole Panel area?

    Thanks.
  2. #2

    RE: Create my own Coolite.Ext.Web.Component



    Echo,

    This is the way it works for me


          
       <ext:Panel ID="Panel2" runat="server" Title="Title" Header="true">
           <Body>
             <ext:FitLayout ID="FitLayout1" runat="server">
             .....
             ..... in my case, I have a GridPanel and fits the panel area
             </ext:FitLayout>
           </Body>
       </ext:Panel>
    I hope it works,
  3. #3

    RE: Create my own Coolite.Ext.Web.Component



    Thanks Ernesto!

    It almost works: for some reason, when I am loading the page, the panel is shrinking to minimum size. When resizing the browser-window, the panel suddenly appears fine...

    Maybe I will find a workaround for this...

    Thanks again,
    echo.

Similar Threads

  1. Replies: 9
    Last Post: Oct 27, 2011, 5:04 PM
  2. [CLOSED] eventmask for non coolite component
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 22
    Last Post: Aug 26, 2011, 12:56 PM
  3. Replies: 3
    Last Post: May 07, 2009, 6:37 AM
  4. How to create custom client component class?
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 24, 2008, 5:17 AM
  5. Replies: 1
    Last Post: Oct 10, 2008, 10:28 PM

Posting Permissions