[perl-win32-gui-users] Win32::GUI::Grid v0.1
Hi All, I made a new package for add a Grid control to Win32::GUI. See more at : http://perso.club-internet.fr/rocherl/Win32GUI.html#Grid (documentation, source code + sample, ppm package for ActivePerl 5.6 & 5.8) I use MFC Grid control 2.24 by Chris Maunder from CodeProject.com See : http://www.codeproject.com/miscctrl/gridctrl.asp After some search, i found a way to use a MFC control in perl extension and use it with Win32::GUI. You probably need MFC42.dll for use it. Actually, all basics functions are availlable. In my todo list : - Correct Crash if exit during cell editing. - Custom Sort method - Virtual Mode - New cell edit control (Combobox, ...) - Printing support (?) - Drag and drop (?) Regards, Laurent.
Re: [perl-win32-gui-users] How to define generic handler for buttons
If you have the last Win32::GUI 0.0.655, you can use the NEM (New Event Model) for set an event function at creation time. $Button = $Window->AddButton ( -name => "Test", -text => "Test", -events => { Click => \&Test }, # -events => { Click => "Test" }, # -events => { Click => sub {print " Test click !!!\n"; } }, ); # Test routine sub Test { my $self = shift; my $name = $self->{-name}; print "$name click !!!\n"; } Laurent > I have just started with Win32::GUI. I want to create a small application which starts a > main window with a lot of buttons on it. The buttons are read from a config-file. > > So far so good, the visual creation works just fine! However I now have a lot of > dynamically created buttons and therefore can't add all '_Click' functions to > my application. > > Can I define a general Button-handler? Based on the ButtonName I can determine what to do. <>