WIndow Height Problem

  1. #1

    WIndow Height Problem

    Hello

    I have a problem to give a dynamic to a window size

        <ext:Window 
        ID="UploadImage" 
        runat="server" 
        Icon="ApplicationFormEdit" 
        Hidden="true" 
        Modal="true"
        Constrain="true">
            <AutoLoad 
                Url="/Shared/UploadImage/" 
                Mode="IFrame" 
                TriggerEvent="show" 
                ReloadOnEvent="true" 
                ShowMask="true" 
                MaskMsg="Loading...">
            </AutoLoad>
            <Buttons>
                <ext:Button ID="Button1" runat="server" Text="Close">
                    <Listeners>
                        <Click Handler="#{UploadImage}.hide();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeShow Handler="this.setSize({ width: #{anchura}.getValue(), height: 400});" />
            </Listeners>
        </ext:Window>
    this works!!!



    
        <ext:Window 
        ID="UploadImage" 
        runat="server" 
        Icon="ApplicationFormEdit" 
        Hidden="true" 
        Modal="true"
        Constrain="true">
            <AutoLoad 
                Url="/Shared/UploadImage/" 
                Mode="IFrame" 
                TriggerEvent="show" 
                ReloadOnEvent="true" 
                ShowMask="true" 
                MaskMsg="Loading...">
            </AutoLoad>
            <Buttons>
                <ext:Button ID="Button1" runat="server" Text="Close">
                    <Listeners>
                        <Click Handler="#{UploadImage}.hide();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeShow Handler="this.setSize({ width: #{anchura}.getValue(), height: #{anchura}.getValue()});" />
            </Listeners>
        </ext:Window>
    This does not work :( (It is assumed that the height would have to be the same size as the width)

    Why the height I only change it if I put it directly?

    Greetings and thank you very much
    Attached Thumbnails Click image for larger version. 

Name:	NO.png 
Views:	60 
Size:	25.9 KB 
ID:	2882   Click image for larger version. 

Name:	yes.png 
Views:	72 
Size:	62.7 KB 
ID:	2883  
  2. #2
    Hi,

    This example appears to be working correctly.

    Please provide full code to run.

    Example
    <%@ Page Language="C#" %>
    
    <%@ 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>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Window
                ID="UploadImage"
                runat="server"
                Icon="ApplicationFormEdit"
                Hidden="true"
                Modal="true"
                Constrain="true">
                <AutoLoad
                    Url="Test.aspx"
                    Mode="IFrame"
                    TriggerEvent="show"
                    ReloadOnEvent="true"
                    ShowMask="true"
                    MaskMsg="Loading...">
                </AutoLoad>
                <Buttons>
                    <ext:Button runat="server" Text="Close">
                        <Listeners>
                            <Click Handler="#{UploadImage}.hide();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
                <Listeners>
                    <BeforeShow Handler="this.setSize({ width: 400, height: 400 });" />
                </Listeners>
            </ext:Window>
            <ext:Button runat="server" Text="Show">
                <Listeners>
                    <Click Handler="#{UploadImage}.show();" />
                </Listeners>
            </ext:Button>
        </form>
    </body>
    </html>
  3. #3
    If I put the size directly works. But I want to resize dynamically, so I use width: #{anchura}.getValue() , height: #{anchura}.getValue(), .but the value of height does not take

    regards
    Escuchar
  4. #4
    What is the "anchura"? I guess its value is string.

    Try
    height: parseInt(#{anchura}.getValue())
  5. #5
    #anchura is a hidden field, but I do not understand is because q in width if it takes courage, but not in height.

    In the first post is a picture attached where you see if that takes the value...
  6. #6
    Well, that window seems to have more width than 400, not sure.

    Anyway, please provide a full code to reproduce.
    Last edited by Daniil; Jun 20, 2011 at 7:39 AM.
  7. #7
    height: parseInt(#{anchura}.getValue())
    working properly. Thank you very much. You can mark it as resolved
    Last edited by Daniil; Jun 20, 2011 at 7:39 AM. Reason: Please use [CODE] tags

Similar Threads

  1. [CLOSED] Automatic window height based on content
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 28, 2011, 3:49 PM
  2. [CLOSED] Auto change popop window height and width
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 09, 2011, 8:29 AM
  3. Window Height, AutoHeight, Max-MinHeight Autoscroll
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2010, 1:56 PM
  4. Replies: 1
    Last Post: Mar 25, 2010, 5:59 PM
  5. Replies: 2
    Last Post: Oct 09, 2008, 1:14 PM

Posting Permissions