[CLOSED] Panel / Vertical center?

  1. #1

    [CLOSED] Panel / Vertical center?

    Hey,
    lets say I have something like this:

    <ext:Panel ID="Panel1" runat="server" Height="200">
        <Items>
            <ext:Label runat="server" Text="test"></ext:Label>
        </Items>
    </ext:Panel>
    How can I center the Label both Horizontal and Vertical? Horizontal I think I can use the Layout="center", but Vertical?

    I read this post:
    http://forums.ext.net/showthread.php?4179

    but that doesnt really seem the way I want to go... AbsoluteLayout and stuff? hmm...
    Last edited by Daniil; May 06, 2011 at 3:22 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please see the following sample
    <%@ 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:Viewport runat="server">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Align="Center" Pack="Center" />
                </LayoutConfig>
                
                <Items>
                    <ext:Panel ID="Panel1" runat="server" Height="200" Title="Panel" Width="200">
                        <Items>
                            <ext:Label runat="server" Text="test"></ext:Label>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
    
        </form>
    </body>
    </html>
  3. #3
    Thx, Ill try that.

    can <LayoutConfig> be used directly in Panel, so that ViewPort can be skipped?
  4. #4
    Sure, you can use LayoutConfig for Panel.

    See also
    http://forums.ext.net/showthread.php?13049

Similar Threads

  1. Replies: 1
    Last Post: Oct 26, 2012, 8:52 AM
  2. Replies: 2
    Last Post: Mar 29, 2012, 9:00 PM
  3. [CLOSED] Vertical Button With Text, Or Vertical Tabs
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 21, 2011, 9:43 PM
  4. [CLOSED] Panel Center
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 23, 2009, 12:37 PM
  5. Replies: 3
    Last Post: Sep 13, 2008, 10:09 AM

Tags for this Thread

Posting Permissions