1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    Learn is on a distinguished road

      0  

    Question Answered: Aligning buttons in messagebox

    Answered: Aligning buttons in messagebox


    Hi,

    I need to align the OK button of the message box to the right. I am using the Ext.MessageBox class to display my messagebox. I have tried using buttonAlign but that doesnt work. Also tried to create a custom button and attach a class to it but this button is not being displayed. Any ideas please?

    Ext.MessageBox.show({
    title: 'Error',
    msg: "This is a message", //getting the value
    buttonAlign:'right', //doesnt work
    buttons: Ext.MessageBox.OK,
    icon: infoType
    });

  2. You can update the layout of the toolbar the buttons live in. Right now it has pack : 'center'

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      -1  

    Default


    You can update the layout of the toolbar the buttons live in. Right now it has pack : 'center'
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    Learn is on a distinguished road

      0  

    Default


    Hi,

    Thanks a lot for the help. I am very new to extjs. Could you please direct me to the js file which would have this. Thanks again.

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The MessageBox source is in the src/window/MessageBox.js file.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    Learn is on a distinguished road

      0  

    Default


    Made a change to this part of MessageBox.js file. Thanks again.

    getDialog : function(titleText){
    if(!dlg){
    var btns = [];

    buttons = {};
    Ext.each(buttonNames, function(name){
    btns.push(buttons[name] = new Ext.Button({
    text: this.buttonText[name],
    handler: handleButton.createCallback(name),
    hideMode: 'offsets'
    }));
    }, this);
    dlg = new Ext.Window({
    autoCreate : true,
    title:titleText,
    buttonAlign:"right",

  7. #6
    Sencha Premium Member
    Join Date
    Oct 2012
    Posts
    24
    Answers
    1
    Vote Rating
    2
    nirvdrum is on a distinguished road

      1  

    Default


    If you have a moment, an example that doesn't require modifying the ExtJS source would be much appreciated. I tried a few approaches to building up my own toolbar in Ext.MessageBox.show, but I'm fairly new to the object model and am clearly missing something.

    FWIW, "buttonAlign" seems like it'd be a great option if it worked. I see it's no longer even in the ExtJS 4.1.3 source, although it still appears in the documentation.

  8. #7
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    33
    Vote Rating
    9
    dwils will become famous soon enough

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    The MessageBox source is in the src/window/MessageBox.js file.
    And if you're pulling from the CDN?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi