[CLOSED] My own control with flex size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] My own control with flex size

    Hi!

    It's wonderful how the controls ext.net fit the browser size.

    I'm creating my own control to speed up some repetitive tasks.

    I wish my own control also to fit in your control container. The container is a Ext.Panel and I declare my controle between <content> and </ content> tags.

    Is there any way to my control inherit this feature?

    Thanks for any help!
    Last edited by Daniil; Feb 02, 2012 at 2:29 PM. Reason: [CLOSED]
  2. #2
    Hi,

    If your Control inherits from Ext.Net.Panel, then you can just add your Control into the <Items> Collection. And if inherited from Ext.Net.Panel, you will have inherited the .Flex property.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Hi Geoffrey

    Thanks for your answer...

    I try follow your hint, but I fail.

    The vb.net accepts only one inheritance by class.
    If my control does not inherit by System.Web.UI.UserControl, I can not register my control in a aspx page.
    The method to register my control in aspx page follow

    <%@ Register src="~/app/tools/WebExplorer.ascx" tagname="WebExplorer" tagprefix="superaWebControl" %>
    How can I consume my control in a aspx page inheriting from ext.net.Panel? is there another way?

    Thanks for your help!!!
  4. #4
    Hi,

    Really, there is no way to inherit a control from two classes.

    There are the following two features in Ext.NET v2.

    To understand the first one, please read the steps:

    1. Define only Ext.NET controls at the top level of a user control.

    2. Place that user control into Content of some Ext.NET container.

    3. Set up a respective Layout for that container.

    4. The feature - the top level Ext.NET controls of the user control become common items of the Ext.NET container and participate in the layout logic according to the Layout you set up for the container.

    The second feature is the <ext:UserControlLoader> control. Set up a respective Path to a user control and use it within Items of any Ext.NET container. You will get the same effect that the first feature gives.


    As well you can consider a possibility to inherit your control from the Ext.Net.Panel to use it directly within Items.
  5. #5
    Hi Daniil...

    I follow your suggestions, and works very well...

    1 - In my user control, I use only ext.net controls
    2 - Load my usercontrol with ext:UserControlLoader

    <ext:Panel ID="panelCenter" runat="server" Region="Center" BodyPadding="6" flex="1" Layout="FitLayout">
         <Items>
              <ext:UserControlLoader runat="server" Path="~/app/tools/WebExplorer.ascx" Flex="1">
              </ext:UserControlLoader>
        </Items>
    </ext:Panel>
    Now, that I can access the properties and methods of my usercontrol in codebehind, how should I proceed?
    I must declare an id to the ext: UserControlLoader and always use it?
  6. #6
    Please use the UserControls collection of UserControlLoader.

    Also there is the Components collection. It collects top level Ext.NET controls of a user control.

Similar Threads

  1. [CLOSED] Image control automatic size (max control)
    By FAS in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 27, 2012, 7:52 AM
  2. [CLOSED] HTMLEditor - more granular control over font size
    By pj_martins in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 07, 2011, 3:25 PM
  3. [CLOSED] different size in control IE7 vs IE8, 9
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 15, 2011, 12:20 PM
  4. [CLOSED] What is Flex?
    By jwf in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 10, 2011, 9:59 PM
  5. How to auto-size non Ext or ASP control?
    By dbassett74 in forum 1.x Help
    Replies: 4
    Last Post: May 15, 2009, 2:23 PM

Tags for this Thread

Posting Permissions