PDA

View Full Version : [CLOSED] Enable/Disable Button



FVNoel
Mar 12, 2013, 7:16 PM
Good afternoon,


I have the following problem:


I have a button with the property standout= true.


If I run:


App.MyButton.disable ();
App.MyButton.enable ();
App.MyButton.disable ();




The standout property disappears. Why is this happening?


Thank you.

Baidaly
Mar 13, 2013, 12:08 AM
Hello!

I've tried the following with the trunk and it works fine:



<%@ Page Language="C#" %>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET Examples</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:Button runat="server" Text="Button1" StandOut="True" ID="Button1"></ext:Button>

<ext:Button runat="server" Text="disable&enable&disable Button1" OnClientClick="#{Button1}.disable(); #{Button1}.enable(); #{Button1}.disable();"></ext:Button>
<ext:Button runat="server" Text="Get StandOut of Button1" OnClientClick="Ext.Msg.alert('Value', #{Button1}.standOut);"></ext:Button>
</body>
</html>

FVNoel
Mar 13, 2013, 11:35 AM

Daniil
Mar 13, 2013, 12:01 PM
Hello,

Thank you for the sample.

Please use the following fix for now. We will fix it in SVN soon.

Fix

Ext.button.Button.prototype.onEnable = Ext.Function.createSequence(Ext.button.Button.prot otype.onEnable, function () {
if (this.standOut) {
this.addClsWithUI(this.overCls);
}
});

Daniil
Mar 19, 2013, 12:02 PM
The fix has been committed to SVN and will be included into the next release (v2.2).

Thank you for the report.