Container Dynamically generated from server with VBoxLayout align=center it's not working

  1. #1

    Container Dynamically generated from server with VBoxLayout align=center it's not working

    Hi!
    A Container Dynamically generated from server with VBoxLayout align=center it's not align. It's working fine, but the element it align

    <ext:Toolbar ID="EscritorioToolBar" runat="server" Width="800" Floating="true"  ClassicButtonStyle="true" Flat="true" Border="false" Shadow="false">
        <Defaults>
                <ext:Parameter Name="Scale" Value="small" /> <%-- esto define el tama?o de la tipografia --%>
        </Defaults>
    </ext:Toolbar>
    
    <ext:Toolbar ID="EscritorioToolBar" runat="server" Width="800" Floating="true"  ClassicButtonStyle="true" Flat="true" Border="false" Shadow="false">
        <Defaults>
                <ext:Parameter Name="Scale" Value="small" /> <%-- esto define el tama?o de la tipografia --%>
        </Defaults>
    </ext:Toolbar>

    var imgButton = new Ext.Net.ImageButton();
    imgButton.ID = "imageButton1";
    imgButton.ImageUrl = @"resources/" + "cmd.png"; //+ menu.Icono.ToLower() + ".png";
    imgButton.Width = 45;
    imgButton.AddListener( "click", new JFunction("alert('hello')) );
    
    var lblTexto = new Ext.Net.Label("Something...");
    lblTexto.Cls = "dv-buttonText";
    
    
    var containerConfig = new Ext.Net.Container.Config
    {
        Layout = LayoutType.VBox.ToString(),
            Width = 60,
            Height = 80
    };
    containerConfig.LayoutConfig.Add(new VBoxLayoutConfig {Align = VBoxAlign.Center, Pack = BoxPack.Center});
                        
    var container = new Ext.Net.Container(containerConfig);
    container.Add(imgButton);
    container.Add(lblTexto);
    EscritorioToolBar.Items.Add(container);
    Thank in advance!
    Last edited by Daniil; Nov 21, 2014 at 6:07 AM. Reason: Please use [CODE] tags
  2. #2
    Hi @plusbyte,

    Welcome to the Ext.NET forums!

    Please provide a full test case to copy, paste and run without any changes, see Example (Very Helpful):
    Forum Guidelines For Posting New Topics

Similar Threads

  1. [CLOSED] VBoxLayout Align Center
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 05, 2016, 4:15 PM
  2. Not working Chart in VBoxLayout
    By his363 in forum 2.x Help
    Replies: 0
    Last Post: May 11, 2012, 8:04 AM
  3. [CLOSED] Center align panel in container
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 04, 2012, 6:55 AM
  4. [CLOSED] Add record server side to dynamically generated store
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 01, 2011, 7:36 PM
  5. Replies: 2
    Last Post: May 23, 2011, 8:46 PM

Tags for this Thread

Posting Permissions