From: Roode, E. <er...@ba...> - 2007-04-24 18:35:18
|
For what it's worth, I have always been unclear on what the Win32::GUI doco means by "the event is not passed to the default event processor". Any clarification, anywhere, would be useful.=20 Eric -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of Glenn W Munroe Sent: Tuesday, April 24, 2007 2:27 PM To: 'Glenn Linderman'; 'GUI' Subject: Re: [perl-win32-gui-users] disabling the check on a checkbox??? Glenn, I wouldn't expect it to prevent it from being checked. Do you expect this behaviour from the Windows control itself or from Win32::GUI? Certain actions for some controls have a "pre-change" notification (e.g. the TCN_SELCHANGING notification sent when a tab is *about* to change), which can be used to prevent the change, but I don't see anything like that on MSDN for a checkbox. Or do you expect this from Win32::GUI? I know a return value of 0 prevents the "default action" from taking place, but I see that as a "post-change" action, if that makes sense. (I'm not sure where that action is defined).=20 Or am I missing your point entirely? Glenn2 > -----Original Message----- > From: per...@li... [mailto:perl- > win...@li...] On Behalf Of Glenn=20 > Linderman > Sent: 24 April 2007 13:39 > To: GUI > Subject: [perl-win32-gui-users] disabling the check on a checkbox??? >=20 > use strict; > use warnings; >=20 > use Win32::GUI(); >=20 > my $mw; >=20 > $mw =3D new Win32::GUI::Window( > -name =3D> "mw", > -title =3D> "Checkbox default action", > -pos =3D> [100, 100], > -size =3D> [200, 200], > -dialogui =3D> 1, > ); >=20 > $mw->AddCheckbox( > -name =3D> "cb", > -text =3D> 'click me', > -pos =3D> [10, 20], > -tabstop =3D> 1, > -onClick =3D> sub { return 0; }, > ); >=20 >=20 > $mw->Show(); > Win32::GUI::Dialog(); >=20 >=20 > Why does the above program allow the checkbox to be checked and=20 > unchecked? Why doesn't the -onClick handler, which returns 0, prevent > the box from being checked? >=20 > -- > Glenn -- http://nevcal.com/ > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > A protocol is complete when there is nothing left to remove. > -- Stuart Cheshire, Apple Computer, regarding Zero Configuration=20 > Networking >=20 >=20 > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by DB2 Express Download DB2 Express > C - the FREE version of DB2 express and take control of your XML. No=20 > limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/ |