$Win->CB->Enable(0); # grayed out $Win->CB->Enable(1); # normal
> -----Original Message----- > From: Christian Kappler [mailto:[EMAIL PROTECTED] > Sent: Monday, February 11, 2002 17:09 > To: Perl-Win32-GUI Mailinglist > Subject: [perl-win32-gui-users] Graying out checkbox > > > Hello listers, > > I would like to gray out a checkbox in some situations. The Win32::GUI > documentation says that, to do this, I should call the > SetCheck([VALUE]) > method with the value 2 to set the checkbox to indeterminate > or gray. I > tried it on my NT-workstation, but the checkbox only becomes > "checked", but > not grayed. Is there something I do wrong or some other way to set a > checkbox to indeterminate? > > I send some demonstration code bellow. > > Regards, > > Christian > > *** Code follows *** > > #!perl > > use Win32::GUI; > > $Win = new Win32::GUI::Window( > -name => 'Win', > -title => 'Testing Checkbox', > -height => 300, > -width => 400, > ); > > $Win->AddCheckbox( > -name => 'CB', > -top => 130, > -left => 50, > -height => 20, > -width => 300, > -text => 'This checkbox should be indeterminate (grayed)', > ); > > # Setting the checkbox state to 2 (grayed): > $Win->CB->SetCheck(2); > > # Display the window with the checkbox: > $Win->Show(); > Win32::GUI::Dialog(); > > sub Win_Terminate { > return -1; > } > > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >