Possible to combine Absolute and Anchor layouts?

  1. #1

    Possible to combine Absolute and Anchor layouts?

    In order to have total control over the layout and appearance of a form, we are opting to not use the FormLayout because it seems to have tight control over layout of elements. So, we are attempting to use absolute positioning along with the ability for a control to resize itself, but I can't quite figure this out. In the following code, how would I get TextArea1 to automatically grow in height and width when the window is resized while retaining its absolute X/Y position but not affecting TextField1?

    <%@ Page Language="VB" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <%@ Register Src="~/RequestLetterPanel.ascx" TagName="RequestLetterPanel" TagPrefix="uc" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
    
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server">
        </ext:ScriptManager>
            <ext:Window ID="RequestLetterDlg" runat="server" Title="New Request Letter" Modal="false" Show&#111;nload="true" Width="300" Height="200">
                <Body>
                    <ext:AbsoluteLayout ID="AbsoluteLayout1" runat="server">
                        <ext:TextField ID="TextField1" runat="server" X="10" Y="20">
                        </ext:TextField>
                        <ext:TextArea ID="TextArea1" runat="server" X="50" Y="50" Height="100" Width="200">
                        </ext:TextArea>
                    </ext:AbsoluteLayout>
                </Body>
            </ext:Window> 
        </form>
    </body>
    </html>
  2. #2

    RE: Possible to combine Absolute and Anchor layouts?

    Interesting... I thought this was possible, and it is, but AbsoluteLayout was inheriting from the wrong class. Once corrected, the following sample is possible.

    Example

    <ext:Window 
        ID="RequestLetterDlg" 
        runat="server" 
        Title="New Request Letter" 
        Modal="false" 
        Show&#111;nload="true" 
        Width="300" 
        Height="200">
        <Body>
            <ext:AbsoluteLayout runat="server">
                <Anchors>
                    <ext:Anchor>
                        <ext:TextField ID="TextField1" runat="server" X="10" Y="20" />
                    </ext:Anchor>
                    <ext:Anchor Horizontal="100%" Vertical="100%">
                        <ext:TextArea ID="TextArea1" runat="server" X="50" Y="50" Height="100" Width="200" />
                    </ext:Anchor>
                </Anchors>
            </ext:AbsoluteLayout>
        </Body>
    </ext:Window>
    This fix might have to wait for the next major release (v1.0) as it would cause a pretty serious breaking change.

    Geoffrey McGill
    Founder & CEO
  3. #3

    RE: Possible to combine Absolute and Anchor layouts?

    Okay, good I'm not crazy then. For now, it's not a real showstopper as I can get around this with some good bit of handy work, but I would really like to see this in some future release. Thanks again.
  4. #4

    RE: Possible to combine Absolute and Anchor layouts?





    It is important to note that the 'Anchors' markup does not appear in intellisense.

  5. #5

    RE: Possible to combine Absolute and Anchor layouts?

    Hi,

    Anchors is DefaultInnerProperty therefore aspx intellisense doesn't show it
    Vladimir Shcheglov
    Sr. Developer
  6. #6

    RE: Possible to combine Absolute and Anchor layouts?

    It is important to note that the 'Anchors' markup does not appear in intellisense.
    Just for future reference, in the v1.0 release, the <Anchors> inner property does properly come up as an option in intellisense.


    Geoffrey McGill
    Founder & CEO

Similar Threads

  1. Display combine fields in gridpanel
    By Vaishali in forum 1.x Help
    Replies: 3
    Last Post: Feb 06, 2012, 3:39 AM
  2. Replies: 7
    Last Post: Jan 25, 2012, 11:25 AM
  3. Combine script files
    By jchau in forum Feature Requests
    Replies: 6
    Last Post: Jul 05, 2011, 6:01 PM
  4. [CLOSED] Combine script files
    By aabramov in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 05, 2011, 5:31 PM
  5. Combine label alignement in FormLayout
    By sfvaleriano in forum 1.x Help
    Replies: 4
    Last Post: Jun 24, 2009, 12:31 PM

Posting Permissions