Alternatively, If you want to change the text of a selected item based on
the column click event, you can do the following:
sub ListView_ItemClick() {
my($item)=@_;
if ($LVarr[$item] == 0) {$image=1;}
else {$image=0;}
$LVarr[$item]=$image;
$LV->ChangeItem(-item => $item, -image => $image);
}
sub ListView_ColumnClick() {
my($column)=@_;
$item = $LV->SendMessage(0x1042, 0, 0);
$LV->ChangeItem(-item => $item, -subitem => $column, -text => "I'm
Here");
}
-----Original Message-----
From: Eric C. Hansen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 14, 1999 2:21 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [perl-win32-gui] ListView
One workaround would be to create an array and store the text value there
(indexed by $item). I did something similar to store the image associated
with an $item. My program toggled the image when the user clicked the
ListView item. So I kept an array of the current image:
sub ListView_ItemClick() {
my($item)=@_;
if ($LVarr[$item] == 0) {$image=1;}
else {$image=0;}
$LVarr[$item]=$image;
$LV->ChangeItem(-item => $item, -image => $image);
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Eric C. Hansen
Sent: Thursday, October 14, 1999 1:20 PM
To: [EMAIL PROTECTED]
Subject: RE: [perl-win32-gui] ListView
sub ListView_ItemClick() {
my($item)=@_;
$LV->ChangeItem(-item => $item, -text => "I can change but not get");
}
TIM,
I'm not sure how to get the text, but I know how to change it. I would
like to know as well how to get the text.
Eric
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Thomas, Timothy B
Sent: Thursday, October 14, 1999 11:42 AM
To: [EMAIL PROTECTED]
Subject: [perl-win32-gui] ListView
Does anyone know how to pull the text from a selected item in a ListView
object? I'm sure it's simple, I just can't seem to find the right syntax.
----------------------------------------------------------------------------
---------------------
Tim Thomas
Unix Systems Administrator
Lockheed Martin EIS · Denver Data Center
303-430-2281 · Pager 303-266-7971
mailto:[EMAIL PROTECTED]
Pager: mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------
---------------------