Pierre Rouleau wrote:
Hi all,
I am using the FindItem method to search for a an item inside a
wxListCtrl list. How can i automatically scroll the found item into
sight if the item found is outside the portion of the list currently
seen in the window?I tried SetFocus() but it did not help.
What should I read in WxWindows docs to lean more about
auto-scrolling?Thanks for your time.
The following works for me:
listctl.SetItemState(index,
wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED,
wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED)
listctl.EnsureVisible(index)
Hope this helps,
Will Sadkin
Parlance Corporation
www.nameconnector.com