Resizing Layout when using Resizable & TextArea Grow

  1. #1

    Resizing Layout when using Resizable & TextArea Grow

    Hi there,

    I asked here in past how to work with TextArea Grow and Resizable control.
    It was just now that came to my attention that when using those together I can not use something like AutoWith for the TextArea within a FitLayout in a FormPanel.

    I mean, it is ok in respect of AutoGrow that my problem was solved, but when I restore down the browser window size or expland an East Region I would like the TextArea resize itself as all the others field do.

    Is there a way to accomplish this? I could not make it.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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>Resizable &amp; TextAreaGrow</title>
        <style>
        .xt-textarea
        {
           width:70%;
           min-width:50%; 
        }
        </style>
    </head>
    <body>
        <ext:ScriptManager runat="server" />
        <h1>
            Resizable &amp; TextAreaGrow in Markup</h1>
        <ext:Panel ID="PanelForm" runat="server" Frame="true" Title="" Icon="ApplicationForm"
            MonitorPoll="500" MonitorValid="true" AutoWidth="true" Height="500">
            <Body>
                <ext:FitLayout ID="FitLayout1" runat="server">
                    <ext:FormPanel ID="FormPanelDetails" runat="server" Frame="false" Title="" BodyBorder="false"
                        Border="false" Icon="ApplicationFormEdit" ButtonAlign="Center" Stateful="true"
                        LabelWidth="70" AutoWidth="true">
                        <Body>
                            <ext:FormLayout ID="FormLayout1" runat="server">
                                <ext:Anchor>
                                    <ext:TextArea ID="TextAreaDescription" runat="server" FieldLabel="Description" GrowMax="200"
                                        Grow="true" AutoWidth="true">
                                        <Listeners>
                                            <AutoSize Handler="#{CustomResizer}.resizeTo(this.getWidth(), this.getHeight());" />
                                        </Listeners>
                                    </ext:TextArea>
                                </ext:Anchor>
                            </ext:FormLayout>
                            <ext:Resizable ID="CustomResizer" runat="server" Element="={#{TextAreaDescription}.el}"
                                Wrap="true" Pinned="false" Handles="SouthEast" Draggable="false" Dynamic="false">
                                <Listeners>
                                    <Resize Handler="#{TextAreaDescription}.growMin = height;" />
                                </Listeners>
                            </ext:Resizable>
                        </Body>
                    </ext:FormPanel>
                </ext:FitLayout>
            </Body>
        </ext:Panel>
    </body>
    </html>
    Thanks in advance.

    Leo

  2. #2

    RE: Resizing Layout when using Resizable & TextArea Grow

    Hi

    Also I forgot to mention that I noticed using Firebug that the style applied to the TextArea is something like:

    <div ruleid="//*[@id=&quot;TextAreaDescription&quot;]" role="presentation" class="cssRule insertInto cssEditableRule "><div role="listitem" class="cssHead focusRow ">   element.style
     {
    <div role="group" class=" "><div role="listbox" class="cssPropertyListBox "><div role="option" class="cssProp focusRow 
    editGroup ">       height:54px;
    <div role="option" class="cssProp 
    focusRow editGroup ">       position:static;
    <div role="option" class="cssProp 
    focusRow editGroup ">       width:196px;
    
    
    <div role="presentation" class="editable insertBefore ">   }
    Therefore with fix width in pixel the size will never Auto-Adjust as it would in %.
    I don't know if there is any class attribute that can override this bit, but I tried with all I saw.

    Thanks
    Leo.

Similar Threads

  1. Replies: 1
    Last Post: Oct 07, 2011, 8:34 AM
  2. [CLOSED] TextArea - Grow to early.
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 06, 2011, 9:43 PM
  3. [CLOSED] [1.0] Combobox Grow property; Textfield Grow
    By betamax in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 03, 2010, 8:01 PM
  4. [CLOSED] Layout resizing issue
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Feb 05, 2010, 2:06 PM
  5. [CLOSED] Resizable & TextArea Grow="true"
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 21, 2010, 8:19 AM

Posting Permissions