Re: Re: Noobie
Alexander Olk <[email protected]> Tue, 12 Oct 2004 18:08:00 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <1097597280.4637.5.camel@Dellkiste> |
Am Montag, den 11.10.2004, 13:24 +0200 schrieb Alessandro Lendaro:
> Thanx Alexander
>
> > Change 2 lines...
> >
> > info.Id = ((ListEvent)e).ID;
> > to
> > info.Id = ((ListEvent)e).Index;
> >
> > and
> >
> > lstctrl.GetItem(out info);
> > to
> > lstctrl.GetItem(ref info);
>
> I get compile errors saying ListEvent does not contain a definition for
> Index and
> that I cannot convert from out to ref...
Oops, my fault :)
I've updated ListCtrl code in cvs... ListEvent.Index is missing in 0.5
but will be available in the next version...
Well, lstctrl.GetItem(out info) is correct (for 0.5).
You can get the item that is responsible for the event with
ListItem li = ((ListEvent)e).Item;
public void OnSelectItem(object sender, Event e)
{
ListItem info = ((ListEvent)e).Item;
Console.WriteLine(info.Text);
}
(That should work :)
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