From: Mattia B. <mb...@ds...> - 2002-05-06 17:39:17
|
> yes, I saw this. it makes perfect sense in a C++ world, but not > completely for wxPerl. I agree... I'll add a note. > for example, how do you select an item in a Wx::ListCtrl? I'd assume you You don't need wxListItem :-) my $index = $event->GetIndex(); # or whatever # select # value mask $list->SetItemState( $index, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); # deselect $list->SetItemState( $index, 0, wxLIST_STATE_SELECTED ); # set the focus, clear selection $list->SetItemState( $index, wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED ); > would mess with ITEM_STATE somehow. the wxWindows examples speak of > setting an id prior to calling SetInfo() (the id specifies which list > entry) - how do you do this? in fact, if anyone has 10 or so lines of > Perl code which shows from start to finish how to select an item, I'd > really appreciate it. HTH Mattia P.S.: there is a ( perhaps clearer ) explanation about SetItemState somewhere in the archives |