I've used the following code to get notified when an item changes:
sub DirTree_Click # Anytime user clicks in our window
{
my ($x,$y) = Win32::GUI::GetCursorPos();
# Grab mouse pointer location
my ($left,$top,$right,$bottom) = $dirtree->GetWindowRect ();
# Subtract upper left of our control
$x -= $left;
$y -= $top;
my ($node,$ninfo) = $dirtree->HitTest ($x, $y);
# See where they clicked. $node will be the node they
# clicked on; $ninfo will be a number indicating where.
return if ($node eq "0"); # Don't remember why I added this :)
return if ($ninfo != 64); # '64' means they clicked the
# checkbox
On Fri, 23 May 2003 [EMAIL PROTECTED] wrote:
> I tried _ItemCheck, this worked like a charm!
>
> Regards,
> Sam Dela Cruz
>
>
>
>
>
>
>
>
>
>
> "Stuart Arnold" <[EMAIL PROTECTED]>
> Sent by:
> [EMAIL PROTECTED]
> 05/16/2003 05:49 PM
>
>
> To: Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]
> <[email protected]>
> cc:
> Subject: RE: [perl-win32-gui-users] ListView question: What
> event should I use when
> checking an item on a list?
> Classification:
>
>
>
> I gave up on _ItemClick, Just try the "_Click" like a Listbox does.
> You don't get anything as part of your call like ItemClick does, you
> just have to inspect the selected item(s).
> Besides, you get better control on what's going on.
>
> To inspect, just get SelectedItems, then loop thru them for their
> options, eg, -checked.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Friday, May 16, 2003 7:33 PM
> To: [email protected]
> Subject: [perl-win32-gui-users] ListView question: What event should I
> use when checking an item on a list?
>
>
> Hi All,
>
> Another question. There are only three events in the documentation for
> ListView:
> 1. ColumnClick
> 2. ItemClick
> 3. KeyDown
>
> So if I want to capture the moment that a user checks on a list item,
> what
> do I use. Nothing seems to fit, I tried ItemClick but this only
> responds
> when you select an item, not when you check an item.
>
> Please help. Thanks.
>
> Regards,
> Sam Dela Cruz
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: If flattening out C++ or Java code to
> make your application fit in a relational database is painful,
> don't do it! Check out ObjectStore. Now part of Progress Software.
> http://www.objectstore.net/sourceforge
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: If flattening out C++ or Java
> code to make your application fit in a relational database is painful,
> don't do it! Check out ObjectStore. Now part of Progress Software.
> http://www.objectstore.net/sourceforge
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>