Ext:Window

  1. #1

    Ext:Window

    Hi,


    i want to set initial position for the ext:window when it will be first time shown. initially the window is hidden

    i am using window.setPosition(x,y); before executing the window.show() command. it doesnt works for showing the window first time but works for onwards even if the window position is changed through drag.
  2. #2
    Hi,

    Please just set .X and .Y Window's properties.
  3. #3
    i have set the x and y values for the window but it still doesnt fix the window at the specified position
    
    <ext:Window runat="server" Width="695" Height="560" Closable="false" ID="winBody" Shadow="None" Hidden="true" AnimateTarget="lblAnimTar" X="180" Y="0">
                
            </ext:Window>
  4. #4
    Please provide a sample to reproduce.
  5. #5
    
    <script type="text/javascript">
    		
    		    var showWindow = function(win){
    		        win.setPosition(140,0);
    		        win.show();
    		    
    		    };
    </script>
    
    <ext:Viewport runat="server" ID="pageViewPort" Layout="Border">
                <Items>
                    <ext:Panel runat="server" Padding="5" ID="pnlNorth" Border="false" Height="80" Region="North" Cls="m-north-region-panel">
                    </ext:Panel>
                    
                    <ext:Panel runat="server" ID="pnlCenter" Border="false" Region="Center" Cls="m-center-region-panel">
                        <Items>
                               <ext:Button runat="server" Height="40" Text="Customer Orders" ID="btnTest">
    						        <Listeners>
                                    <Click Handler="showWindow(#{winBody});" />
                                </Listeners>
    						    </ext:Button>
                        </Items>
    
                    </ext:Panel>
                    
                    <ext:Panel runat="server" ID="pnlSouth" Border="false" Height="60" Region="South" Cls="m-south-region-panel">
                    </ext:Panel>
                </Items>
            </ext:Viewport>
    
    <ext:Window runat="server" Width="695" Height="560" Closable="false" ID="winBody" Shadow="None" Hidden="true" AnimateTarget="lblAnimTar" X="180" Y="0">
                
            </ext:Window>
    well i am using the above example and when the button clicks i want to show and align the window to Viewport Center panel X=somevalue and Y=somevalue
  6. #6
    Hi,

    Try to set InitCenter="false" for the window
  7. #7
    Also, please use PageX and PageY

Similar Threads

  1. [CLOSED] Problem: Closing Maximized Window will loose parent window scrollbar
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 8:51 PM
  2. Replies: 8
    Last Post: Mar 13, 2012, 5:54 PM
  3. Replies: 6
    Last Post: Feb 15, 2012, 4:15 PM
  4. Replies: 7
    Last Post: Feb 09, 2012, 11:17 AM
  5. Replies: 1
    Last Post: Mar 14, 2011, 4:20 PM

Posting Permissions