PDA

View Full Version : Enable/Disable Buttons under IE



cupakob
5 Jul 2010, 12:02 AM
Hi *,

i have again a strange IE7 problem. The szenario:

1. Two buttons are default disabled.
21262

2. I switch to another mode, one of the two buttons is enabled
21261

3. I switch again to the previous mode (the mode which i have in step 1)
21260

The problem is, the two buttons have different colors. I'm disabling the buttos with setEnabled(false)...i've also tried disable(), but the result is the same. What can be the reason for the different colors of the buttons?

cyChop
5 Jul 2010, 10:23 PM
Does that happen only in IE?

Maybe the button remains focused even though you disabled it. Have you tried setting the focus onto another component? (widget.focus())

cupakob
5 Jul 2010, 10:34 PM
yes, only under IE....with firefox 3.5.10 is working perfect, here the samples from firefox for the same szenario:

1. Step
21273

2. Step
21275

3. Step
21274

Unfortunately the focus doesn't work :(

cupakob
8 Jul 2010, 9:54 PM
Another ideas?

oxyrox
13 Jul 2010, 6:36 AM
Whitch version of ExtGWT are you using? There was a fix on this problem with the version 2.1 -> changelog (http://www.sencha.com/products/gwt/CHANGES_extgwt-2.1.3.html#Release_2.1).

Or you could try to call this manually... maybe this helps.

Button btn = new Button();
btn.disable();
btn.el().clearOpacity();

Greets,
oxy

oxyrox
13 Jul 2010, 9:42 AM
Hi cupakob,

Which version of GXT are you using? Because there was a fix on this problem in GXT 2.1

What you could try is this:

Button btn = new Button("Button1");
btn.disable();
btn.el().clearOpacity();
... to clear the opacity manually.

Good luck. ;)

Greets,
oxy