Center Window inside panel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Center Window inside panel


    Is there any way to center window inside the panel when page loaded? The problem is i have a HBox Layout with 2 panels (flex=1).

    I tried a window listener <AfterRender> but without success. I also attached the picture what i want to do.

    The bellow code
    <html xmlns="">
    <head runat="server">
        <form id="form1" runat="server">
                <ext:ResourceManager runat="server" />
                <ext:Viewport runat="server" Layout="HBoxLayout">
                        <ext:Panel runat="server" Flex="1" Title="Janela 1" Layout="FitLayout" Height="500">
                                <ext:Window ID="Window1" runat="server" Flex="1" Title="Janela 1" Maximizable="true" Constrain="true">
                        <ext:Panel ID="Panel1" runat="server" Flex="1" Title="Janela 2" Layout="FitLayout" Height="500">
                                <ext:Window ID="Window2" runat="server" Flex="1" Title="Janela 2" Maximizable="true" Constrain="true">
                                        <AfterRender Fn="SetPosition()"></AfterRender>
    <script type="text/javascript">
        function SetPosition() {
            var y = Ext.get('Window2');
    Attached Thumbnails window.jpg  

Similar Threads

  1. [CLOSED] Center window to Panel or Grid
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 26, 2012, 10:39 PM
  2. Replies: 2
    Last Post: Jun 23, 2012, 2:17 PM
  3. Center a panel inside another panel
    By PAOLO in forum 1.x Help
    Replies: 0
    Last Post: Oct 03, 2011, 3:44 PM
  4. [CLOSED] Center GridPanel inside a Panel
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 01, 2009, 5:48 PM
  5. grid panel inside a window
    By [WP]joju in forum 1.x Help
    Replies: 4
    Last Post: Feb 09, 2009, 6:11 AM

Tags for this Thread

Posting Permissions