Re: Noobie
Alexander Olk <[email protected]> Fri, 08 Oct 2004 18:21:22 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <1097252482.5584.3.camel@Dellkiste> |
Am Freitag, den 08.10.2004, 15:54 +0200 schrieb Alessandro Lendaro:
> public void OnSelectItem(object sender, Event e)
> {
> ListItem info = new ListItem();
> info.Id = ((ListEvent)e).ID;
> info.Column = 1;
> info.Mask = ListCtrl.wxLIST_MASK_TEXT;
>
> lstctrl.GetItem(out info);
>
> Console.WriteLine(info.Text);
> }
Change 2 lines...
info.Id = ((ListEvent)e).ID;
to
info.Id = ((ListEvent)e).Index;
and
lstctrl.GetItem(out info);
to
lstctrl.GetItem(ref info);
You need to get the Index of the selected ListCtrl item. ID gives you
the ID of the ListCtrl itself...
Regards
Alexander Olk
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl