Daniel,

Use int GetItemState(long item, long stateMask)
where stateMask is wxLIST_STATE_SELECTED. If the return value == wxLIST_STATE_MASK, then it is selected.

Specifically,
for(int i=0; i<MyListCtrl->GetItemCount(); i++) {
   if(GetItemState(i,wxLIST_STATE_SELECTED) == wxLIST_STATE_SELECTED)
        ;   // then item i is selected
}

Regards, Brian

-------- Original Message --------
Subject: Problem with ListCtrl
Date: Wed, 28 May 2008 23:33:26 -0700 (PDT)
From: Daniel <[EMAIL PROTECTED]>
To: wxperlusers <[email protected]>

Hi all,

I have a ListCtrl in report mode an I like to get the selected items but didn't found any function for this.

There is wxListCtrl::GetSelectedItemCount, so if I can count the selected items I'm sure there is a way to discover these items.
So I'm looking for something like GetSelections or IsSelected.

The Demo didn't help me because I do not want to catch an select-event.

So how to do this?

Thanks and regards
Daniel


      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com

--
Dr. Brian W. Tolman                     512-835-3412
Applied Research Laboratories           P.O. Box 8029
The University of Texas at Austin       Austin, Texas 78713-8029

Reply via email to