From: Marco T. <wx...@so...> - 2002-05-05 12:26:04
|
i'm sorry. i was tired while reading your mail. here a better explanation: that's probably what you're searching for: my $tmp = $event->GetIndex; after that: $listctrl->GetItem($tmp, $column)->GetText; $column is the column you wish to have. greeting Marco >$event->GetItem() returns a Wx::ListItem, not the numeric index of the >item, so $listctrl->GetItem($listitem,1) always fails. > >$listctrl->GetItem(1,1) will give me the second column of the second >item. > >do I have to manually get the selected items from the ListCtrl rather >than from the event? > >thanks, >/dave > >On Saturday, May 4, 2002, at 03:32 , Marco Trudel wrote: > >> $listctrl->GetItem($item, 1)->GetText; >> >> hope it helps. >> >> greeting >> Marco >> >>> I have a Wx::ListCtrl displaying rows of information in report view. I >>> populate this control with InsertStringItem() and SetItem() to set the >>> column information. How do I get the data out?! >>> >>> for example, I intercept a EVT_LIST_BEGIN_DRAG and get an event >>> parameter. from this, I can do my $listitem = $event->GetItem() which >>> returns a wxListItem. the wxWindows documentation seems to stop at this >>> point without a reference page for wxListItem. I've tried >>> $listitem->GetText() which returns nothing, and $listitem->GetText(0) >>> which dies. >>> >>> environment: >>> wxPerl 0.10 >>> wxWindows 2.2.9 >>> Win2K Prof >>> >>> regards, >>> /dave |