PDA

View Full Version : changing Button IconCls



toxkillfraex
15 Mar 2012, 2:58 AM
I was wondering if it was possible to change the iconCls of a button in code after a click event.
I'm hoping to use this for a sort of video/sound player thing to switch between play and pause buttons.

tvanzoelen
15 Mar 2012, 3:06 AM
See the API,

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.button.Button

There is a function setIconCls ans removeIconCls, on click you could use these functions