1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    126
    Vote Rating
    0
    varunach is on a distinguished road

      0  

    Default Change style of Mesagebox's button

    Change style of Mesagebox's button


    Hi,

    Is there a way in which I can change the styling of a Message box's buttons? Example, place a icon, increase site etc.. ?

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    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


    Code:
    Ext.MessageBox.show({
        ....
        buttons: [
            { text : 'Test', iconCls : 'someCSS', scale : 'large' } //look at Button API for configs
        ]
    });
    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.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    126
    Vote Rating
    0
    varunach is on a distinguished road

      0  

    Default


    Nope.. this doesn't work. It doesn't show any buttons now.. From the api :

    A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', cancel:'Bar'}), or false to not show any buttons (defaults to false)
    I think it's not able to recognize the config, hence defaulting to false. I checked out the code and came up with this:

    From ext-all-debug (Ext JS 3.3.1) Ext.Messagebox:

    Code:
    var bs = opt.buttons;
                    var db = null;
                    if(bs && bs.ok){ //bs.ok comes as undefined. Hence no button is added. This also means that we can't add any CSS to the buttons since they are predefined
                        db = buttons["ok"];
                    }else if(bs && bs.yes){ //bs.yes comes as undefined too.. Hence no button is added. This also means that we can't add any CSS to the buttons since they are predefined
                        db = buttons["yes"];
                    }
                    if (db){
                        d.focusEl = db;
                    }
    Maybe this can be added as a feature in the next version of Ext JS.

Similar Threads

  1. Change style for GXT button component
    By bonkers in forum Community Discussion
    Replies: 8
    Last Post: 31 Oct 2011, 12:50 AM
  2. change toolbar button style
    By santoshsatav in forum Ext Designer: Help & Discussion
    Replies: 4
    Last Post: 15 Dec 2010, 7:56 AM
  3. Replies: 0
    Last Post: 29 Oct 2010, 6:30 PM
  4. Button style change from Ext 2.2 to Ext 3.0
    By sl5337 in forum Community Discussion
    Replies: 0
    Last Post: 27 Jul 2009, 8:44 AM
  5. how to change the style to any button ?
    By elosada in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 9 Mar 2009, 12:00 PM

Thread Participants: 1

Tags for this Thread

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