View Full Version : Is it possible to change the UI of a button programmatically?
31 Dec 2010, 3:42 PM
I would to change the UI property of a button from action to decline is this possible?
Right now I have two buttons that I toggle show/hide, but there must be a better way and just have one that changes color.
3 Jan 2011, 5:44 PM
Anybody have any ideas of how this can be done with one button?
3 Jan 2011, 8:06 PM
The 'ui' property just manipulates the button's CSS class name, such as 'x-button-action'.
4 Jan 2011, 6:29 AM
Thanks Steffen, just what I was looking for.
4 Jan 2011, 10:29 AM
I patched the button class to support just such a use case
// Adding setUi method to buttons
this.ui = ui;
this.addCls(this.componentCls + '-' + ui);
this.removeCls(this.componentCls + '-' + this.ui);
4 Jan 2011, 12:01 PM
I like the patch, will come very useful. Thanks.
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.