Johan Lindström wrote:
At 19:59 2005-12-17, Ströbitzer Andreas wrote:
Hello,
Is it possible to change the options of an treeview element which is
created with GuiLoft?
This is something for the Win32::GUI list (which this is cross-posted
to), because that's what the issue is:
Is it possible to add a NEM event handler _after_ control creation?
I don't know the answer to that, but I'm sure one of the Win32::GUI devs
do. If it's not possible, we'll se how we can solve your problem.
$control->SetEvent("EventName", \&sub);
e.g. $win->SetEvent("Click", sub { print "Clicked\n"; });
For efficiency it is also a good idea to add '-eventmodel => "byref"' to
the control's constructor, to force NEM only (assuming you want NEM
only), otherwise, the control will assume OEM when created, but
SetEvent() adds a NEM handler, and the control may still waste time
looking for OEM handlers. I know this doesn't sound ideal, but it's how
it is.
Regards,
Rob.
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/