Add Custom Pressed Cls/Colour to SegmentedButton Sencha Touch 2

Turns out one tiny hassel in Sencha Touch 2 is that the segmented buttons look terrible. You can barely tell when one is pressed. Well here’s a simple solution for that…

Step 1 : Make the Cls 

.myPressedLook { color : #a00 }  //customize this with the colour you want. 

Step 2 : Insert into the JS code

{
     xtype : ‘segmentedbutton’,
     pressedCls : ‘myPressedLook’,
     items : [{pressed:true, text:’Male’},{text:’Female’}]
}
 
 

Other Posts You May Like :

Add Custom Image to Button Sencha Touch 1/2 Add Pressed Cls to SegmentedButton Sencha Touch 2

Add Disabled Cls to Form Elements Sencha Touch

Advertisements

Leave a message :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s