[CLOSED] Resize Window around FormPanel

  1. #1

    [CLOSED] Resize Window around FormPanel

    I would like a window that may hold a different page based on a button pressed, to resize to the height of the FormPanel. Any hints or out right solutions?

    I have a page with a hidden window defined so that I can use it when pressing an Register, Inactivate or Edit button:

    <ext:Window ID="UserPopup" runat="server" Title="Popup" Width="620" BodyPadding="10" 
        Resizable="false" Closable="true" Layout="FitLayout" Hidden="true" Autoheight="true">
        <Loader runat="server" Mode="Frame" DisableCaching="true">
            <LoadMask ShowMask="true" />
        </Loader>
    </ext:Window>
    
       ...
    
    <ext:Button ID="UserRegister" runat="server" Text="Register" Icon="Add">
       <Listeners>
          <Click Handler="registerNewUser(#{UserPopup});" />
       </Listeners>
    </ext:Button>
    Below is the listener code:

    var registerNewUser = function (window) {
    
       window.loader.url = './UserRegister.aspx';
       window.title = 'Register New User';
       window.show();
    }
    Below is the UserRegister.aspx page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserRegister.aspx.cs" Inherits="UserRegister" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <body>
        <ext:FormPanel ID="FormPanel1" runat="server" AutoHeight="true" BodyPadding="10"
            DefaultAnchor="100%">
            <Items>
                <ext:FieldContainer ID="FullName" runat="server" FieldLabel="Full Name" AnchorHorizontal="100%"
                    Layout="HBoxLayout">
                    <Items>
                        <ext:TextField ID="FirstName" Note="First Name" NoteCls="blue-note" runat="server"
                            Flex="1" Margins="0 3 0 0" Vtype="alpha" AllowBlank="false" MsgTarget="Side"
                            IndicatorIcon="BulletRed" IndicatorTip="It is required field" />
                        <ext:TextField ID="LastName" Note="Last Name" NoteCls="blue-note" runat="server"
                            Flex="1" Vtype="alpha" AllowBlank="false" MsgTarget="Side" IndicatorIcon="BulletRed"
                            IndicatorTip="It is required field" />
                    </Items>
                </ext:FieldContainer>
                <ext:TextField ID="SubOrg" runat="server" Name="SubOrg" FieldLabel="Suborganization"
                    Vtype="alphanum" MsgTarget="Side" AllowBlank="false" IndicatorIcon="BulletRed"
                    IndicatorTip="It is required field" />
                <ext:TextField ID="ClassEmail" runat="server" Name="CEmail" FieldLabel="SIPRNET Email"
                    Vtype="email" MsgTarget="Side" AllowBlank="false" />
                <ext:TextField ID="UnclassEmail" runat="server" Name="UEmail" FieldLabel="Unclassified Email"
                    Vtype="email" MsgTarget="Side" AllowBlank="true" />
                <ext:FieldContainer ID="PhoneNumbers" runat="server" FieldLabel="Phone Numbers" AnchorHorizontal="100%"
                    Layout="HBoxLayout">
                    <Items>
                        <ext:TextField ID="CommPhone" Note="Commercial: Include Area Code (or country/city codes, if overseas)"
                            runat="server" Flex="1" Margins="0 3 0 0" IndicatorIcon="BulletRed" IndicatorTip="It is required field" />
                        <ext:TextField ID="DsnPhone" Note="DSN" runat="server" Name="DSN" Width="60" />
                    </Items>
                </ext:FieldContainer>
                <ext:TextField ID="MailingAddress" runat="server" Name="MailingAddress" FieldLabel="Mailing Address"
                    Note="Street Address, City, State, Zip Code" NoteCls="blue-note" />
                <ext:TextArea ID="Comments" runat="server" Name="Comments" FieldLabel="Comments" />
            </Items>
            <Buttons>
                <ext:Button ID="Button1" runat="server" Text="Submit" />
                <ext:Button ID="Button2" runat="server" Text="Cancel" />
            </Buttons>
        </ext:FormPanel>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Apr 02, 2012 at 2:17 AM. Reason: [CLOSED]
  2. #2
  3. #3
    Arrgh. I hate easy solutions that I can find when surfing the forums, especially when they were posted just 6 weeks ago.
    Please close thread.

Similar Threads

  1. [CLOSED] Slow window resize in IE9
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 11, 2012, 11:25 AM
  2. Replies: 0
    Last Post: Nov 17, 2011, 10:53 AM
  3. [CLOSED] [1.0] GridPanel and Window Resize?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 20, 2010, 1:07 PM
  4. [CLOSED] BUG when resize window
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 30, 2010, 8:15 AM
  5. [CLOSED] Center window on window resize
    By CSG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 29, 2009, 5:05 AM

Tags for this Thread

Posting Permissions