Hello, everybody.
I'm having a problem with Button view when i set status as 'disabled =>
0'. After I change status of button to "disabled => 1',
I'm able to push button, but is still has a gray status "disabled". It
will be 'viewable' after i change status back to "disabled"
Here is a simple code to reproduce the problem:
use Win32::GUI;
$W = new Win32::GUI::Window(
-title => "Win32::GUI::Button test",
-left => 100,
-top => 100,
-width => 360,
-height => 260,
-name => "Window",
);
$i = 0;
$my_but = $W->AddButton(
-name => "Sample",
-left => 5,
-top => 5,
-text => "Click button",
-disabled => 1,
);
$check1 = $W->AddCheckbox(
-name => "Check1",
-left => 8,
-top => 50,
-text => "Checkbox 1",
);
$W->Show;
Win32::GUI::Dialog();
sub Window_Terminate {
return -1;
}
sub Check1_Click {
if($i==0)
{
$my_but->Change(-disabled => 0);
$i = 1;
} else {
$my_but->Change(-disabled => 1);
$i = 0;
}
return 1;
}
Any help is appreciated,
Vassiliy