[CLOSED] ButtonGroup columns

  1. #1

    [CLOSED] ButtonGroup columns

    Is possible to change columns number of the ButtonGroup in a resize event ?


    Thanks
    Last edited by Daniil; Sep 27, 2012 at 6:31 PM. Reason: [CLOSED]
  2. #2
    Hi,

    ButtonGroup internally uses the TableLayout. It doesn't support changing the number of columns on the fly. Rerendering the ButtonGroup can be a solution.

    Or, maybe, you would prefer to switch to a Container with respective layout instead of ButtonGroup.
  3. #3
    Tried to Render the Group but no success. I saw a meesage on ExtJs forum saying is not possible.

    Switched to container and tried this, but didn't find the wining combination, yet:
    <Viewport>
            <Listeners>
                <Resize Handler="var size = Ext.getBody().getViewSize(); if(size.width>1100) {#{Container3}.layout.type='hbox';} else {#{Container3}.layout.type='vbox';} #{Container3}.doComponentLayout(); " />


    Quote Originally Posted by Daniil View Post
    Hi,

    ButtonGroup internally uses the TableLayout. It doesn't support changing the number of columns on the fly. Rerendering the ButtonGroup can be a solution.

    Or, maybe, you would prefer to switch to a Container with respective layout instead of ButtonGroup.
    Last edited by Daniil; Sep 24, 2012 at 10:44 AM. Reason: Please use [CODE] tags
  4. #4
    Quote Originally Posted by watteeuw View Post
    Tried to Render the Group but no success.
    Please demonstrate how did you try?

    Quote Originally Posted by watteeuw View Post
    I saw a meesage on ExtJs forum saying is not possible.
    Please clarify what exactly is not possible? Re-rendering the ButtonGroup?

    Quote Originally Posted by watteeuw View Post
    Switched to container and tried this, but didn't find the wining combination, yet:
    <Viewport>
            <Listeners>
                <Resize Handler="var size = Ext.getBody().getViewSize();  if(size.width>1100) {#{Container3}.layout.type='hbox';} else  {#{Container3}.layout.type='vbox';} #{Container3}.doComponentLayout(); "  />
    I think changing ct.layout.type is not enough to change a layout. Generally, I am not sure the containers support changing its layout on the fly. There is the setLayout method.
    http://docs.sencha.com/ext-js/4-1/#!...thod-setLayout

    But it is private. There is no guarantee that it will work will in public usage. I think changing the layout requires re-rendering as well.

    Could you, please, clarify what exactly are you trying to achieve? Mockups with the initial and after resizing states would be appreciated. Then, probably, we could suggest something concrete.

Similar Threads

  1. [CLOSED] Dynamic ButtonGroup
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 07, 2012, 9:04 AM
  2. Button inside ButtonGroup
    By softmachine2011 in forum 2.x Help
    Replies: 2
    Last Post: Jun 04, 2012, 8:21 AM
  3. [1.0] Toolbar ButtonGroup crashes
    By nextSTEP in forum 1.x Help
    Replies: 7
    Last Post: Jan 20, 2011, 1:49 PM
  4. [CLOSED] [1.0] ButtonGroup tools
    By danielg in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 01, 2010, 12:48 PM
  5. [CLOSED] ButtonGroup Bug
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 13, 2009, 2:42 AM

Posting Permissions