Results 1 to 3 of 3

Thread: Ext Designer Button Alignment

  1. #1
    Ext User
    Join Date
    May 2010
    Posts
    17
    Vote Rating
    0
      0  

    Default Ext Designer Button Alignment

    Hello,

    Lets suppose we have a panel and inside it there are two buttons, is there a way to align these buttons and place them in (let's say) the center of the panel?

    Thank you

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
      0  

    Default

    Hi adhoul,

    You can set the Panel's layout to "hbox", which will make the buttons lay themselves out horizontally next to each other. Setting the layout option 'pack' to 'center' will center the buttons horizontally. Setting the option 'align' to 'middle' will center the buttons vertically. You can then individually set each button's width/flex and margins to size them and space them out accordingly.

    Let me know if that makes sense. Keep in mind you can create nested containers to combine different layouts together to get the exact layout you want.

  3. #3
    Ext User
    Join Date
    May 2010
    Posts
    17
    Vote Rating
    0
      0  

    Default

    yes it makes perfect sense thank you. also what i've found is that Let's say we have a Panel, inside it we place a toolbar with buttons, then we select on the Panel to ButtonAlign "center" so we achieve the same result, which is basically what you mention in the last part of your message I think..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •