----- Original Message -----
From: Mattia Barbon <mb...@ds...>
To: <wxp...@li...>; Marco Trudel <wx...@so...>
Sent: Thursday, March 28, 2002 10:49 PM
Subject: Re: [wxperl-users] wxListCtrl
> > hi all,
> >
> > is it possible that the application deselects an item itself?
> > i couldn't figure out how to do this.
>
> $l->SetItemState( 3, 0, wxLIST_STATE_SELECTED );
> ^ ^ ^
> item state mask
>
> theidea behind state and mask is that you specify in the mask
> the flags you want to change
> ( e.g. wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED ) and list
> in the state the states you want to set asn don't list the
> states you want to clear. So for deselecting the mask contains
> _SELOCTED and the state contains nothing, since you want to
> clear the selection. I hope you undertand this
> confuse explanation...
yes, i didn't understand the wxwindows documentation but i understand
yours... thanks...
but i found out a better way to solve my problem...
i use now "GetNextItem" with "wxLIST_NEXT_BELOW" but it dosn't work the way
i expect it...
if i pass the last selected item to it, i think it should return "-1"... but
it returns the item i passed to GetNextItem...
if i pass "-1" as item, it doesn't find the next (first) selected item...
any hints/ideas?
greeting
Marco
|