Enabling/Disabling does not seem to update the buttons. Run the sample and click the appropriate buttons to enable/disable. You'll notice it always keeps the original state, but when it is enabled you can see when you mouseover that it is clickable but looks disabled. Also note that when showTitle is set to false, it works fine.
Code:
isc.ClassFactory.defineClass("CwButtonItem", "CanvasItem"); isc.CwButtonItem.addProperties({ init:function () { this.canvas = isc.Button.create({ showTitle: this.showTitle, ID: this.widgetID, width: this.width, height: this.height, title: this.buttonLabel, }); return this.Super("init", arguments); } }); isc.HLayout.create({ID:"hl",members: [isc.DynamicForm.create({numCols:2, titleOrientation:"top", fields: [ {widgetID:"mySelect",height: 20, buttonStyle:"button", buttonLabel:" Select ",textAlign:"center",_constructor:"CwButtonItem",disabled: true, showTitle: true}, {widgetID:"myCancel",height:20,width: 100, buttonStyle:"button",buttonLabel:" Cancel ",textAlign:"center",_constructor:"CwButtonItem", showTitle: true } ] })]}); // control button to enable/disable above buttons. isc.Button.create({ title: "Enable All", left: 100, top: 60, click : function () { if (mySelect.isDisabled()) { isc.say("mySelect.isDisabled() is "+mySelect.isDisabled()+", so Select is enabled!"); mySelect.setDisabled(false); myCancel.enable(); this.setTitle("Disable All"); } else { isc.say("mySelect.isDisabled() is "+mySelect.isDisabled()+", so Select is disabled!"); mySelect.setDisabled(true); myCancel.disable(); this.setTitle("Enable All"); } } });
Comment