wxListCtrl: how to chose an item?

Fibre Optic fibre_optic at go2.pl
Fri Nov 3 08:13:16 PST 2006


Troels wrote:
> You can use wxListView instead of wxListCtrl, it has a Select() method.
> 
> Or you can add this to your own wxListCtrl-derivative:
> 
>     void SetSelection(long n, bool on = true)
>     {
>         SetItemState(n, on ? wxLIST_STATE_SELECTED : 0, 
> wxLIST_STATE_SELECTED);
>     }
> (same as wxListView::Select)
> 

yes, it works! Thank you for your prompt answer.

Regards,
Fibre Optic






More information about the wx-users mailing list