1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    10
    Vote Rating
    0
    kiran_e is on a distinguished road

      0  

    Default Unanswered: Button Styles

    Unanswered: Button Styles


    I have created button. I need to change normal, over,disabled style with css any one can give small sample.Including text colors also. Here is is My code

    var button=Ext.create('Ext.button.Button',{text:"Button2",renderTo:Ext.getBody()})

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Give your button a cls so you can target that button. Then you can use that CSS class name to override the different classes that are applied to the button.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    10
    Vote Rating
    0
    kiran_e is on a distinguished road

      0  

    Default


    Thank you for reply,
    I did what you say, i reached what i need. But one thing misssing . I can't change on rollover text properties (size, color) . Here is my code can you help me.


    <html>
    <head>
    <title>Buttoncss_jan_03</title>
    <meta http-equiv="content-type" content="text/html"/>
    <link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css"/>
    <script type="text/javascript" src="../extjs/ext-all.js"></script>
    <style type="text/css">


    .button {
    border-color:#EE0000;
    font-size: 24px !important;
    font-weight: bold !important;
    font-family: 'Arial' !important;
    border: solid 1px #da7c0c;
    background: #ffff00;
    }
    .button .x-btn-inner {
    color:#0000ff;
    font-size: 12px !important;
    font-weight: bold !important;
    font-family: 'Arial' !important;
    }
    .button.my-over {
    background: #00ff00;
    font-size: 18px !important;
    }
    .button.my-disabled{
    background: #cccccc;


    }
    </style>
    <script type="text/javascript">
    function init(){
    Ext.onReady(function (){
    Ext.create('Ext.button.Button',{text:"Button2",
    id:'button2',
    cls:'button',
    overCls:'my-over',
    disabledCls:'my-disabled',
    iconCls:'myIcon',
    renderTo:Ext.getBody()})


    })


    }


    </script>


    </head>
    <body onload="init()"></body>


    </html>