When we select more than one item, how to get the list
of selected items with wxListCtrl ?
I'm looking for something like GetSelections for
wxListBox.
Thanks
···
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
RTFI
long item = -1;
for ( ;; )
{
item = listctrl->GetNextItem(item,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
if ( item == -1 )
break; // this item is selected - do whatever is needed with it
wxLogMessage("Item %ld is selected."), item);
}
Same in python.
loop through GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED) repeatedly until -1 is returned
Kind Regards
Crispin
···
On Wed, Jan 16, 2002 at 12:49:46AM -0800, vincent delft wrote:
When we select more than one item, how to get the list
of selected items with wxListCtrl ?
I'm looking for something like GetSelections for
wxListBox.
> When we select more than one item, how to get the list
> of selected items with wxListCtrl ?
[...]
loop through GetNextItem(item, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED) repeatedly until -1 is returned
Or bind handlers the select- and deselect-events, to maintain your own
list of selections.
···
On Wed, Jan 16, 2002 at 05:30:53PM +0800, crispin@iinet.net.au wrote:
On Wed, Jan 16, 2002 at 12:49:46AM -0800, vincent delft wrote: