[CLOSED] Mixed button alignment

  1. #1

    [CLOSED] Mixed button alignment

    Hi. I have a window with 3 buttons in it's "buttons" tag, and these 3 buttons are centered. Now my client requested the two buttons on the right to be aligned to the right. I'm having a hard time accomplishing this...

    Follows image for better understanding:

    Click image for larger version. 

Name:	botoes.png 
Views:	30 
Size:	10.2 KB 
ID:	8521
    Last edited by Daniil; Mar 25, 2014 at 5:02 PM. Reason: [CLOSED]
  2. #2
    Hi @josegarcia,

    You can use a ToolbarFill.
    http://docs.sencha.com/extjs/3.4.0/#...t.Toolbar.Fill

    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:Panel 
                runat="server" 
                Title="Panel" 
                Html="Panel" 
                ButtonAlign="Center">
                <FooterBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:Button runat="server" Text="Button 1" />
                            <ext:ToolbarFill />
                            <ext:Button runat="server" Text="Button 2" />
                            <ext:Button runat="server" Text="Button 3" />
                        </Items>
                    </ext:Toolbar>
                </FooterBar>
            </ext:Panel>
        </form>
    </body>
    </html>
  3. #3
    I tried this, but this way the first button won't be in the center of the window. It gets centered only relative to the space left by the buttons in the right.
    Last edited by josegarcia; Mar 18, 2014 at 2:15 PM.
  4. #4
    You could shift the Button on the width equals to the combined width of the right Buttons.
    <ext:Button runat="server" Text="Button 1" StyleSpec="margin-left: 162px;" />

Similar Threads

  1. [CLOSED] Change button's icon alignment
    By extnetuser in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 21, 2013, 12:48 PM
  2. [CLOSED] Button Alignment in Panel Header
    By Tarun_Chand in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 09, 2013, 6:26 AM
  3. [CLOSED] Button alignment in GridPanel
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 11, 2010, 4:31 AM
  4. Button (position & alignment)
    By haltenberg in forum 1.x Help
    Replies: 0
    Last Post: Jun 25, 2008, 1:19 PM
  5. Button Alignment v0.5beta
    By m4chine in forum 1.x Help
    Replies: 8
    Last Post: Jun 10, 2008, 2:10 PM

Posting Permissions