I had a question some time ago which is still unresolved.
I would like to have the ListCtrl scroll down to a selected value. In some
previous releases this was easily accomplished with a SetItemState(no,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) approach. That hasn't worked for
quite a while.
In the wxListCtrl demo, if the value 5 is changed to 25 in line 93 ie.
self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) the
problem is illustrated. The value is selected but no effect on the scroll
value.
What is the suggested approach if this is not workable from now on?
I had a question some time ago which is still unresolved.
I would like to have the ListCtrl scroll down to a selected value. In some
previous releases this was easily accomplished with a SetItemState(no,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) approach. That hasn't worked for
quite a while.
In the wxListCtrl demo, if the value 5 is changed to 25 in line 93 ie.
self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) the
problem is illustrated. The value is selected but no effect on the scroll
value.
What is the suggested approach if this is not workable from now on?
Lorne White
I haven't done this before but EnsureVisible() sounds like what you
want.
Thursday, September 28, 2000, 6:24:02 AM, you wrote:
I had a question some time ago which is still unresolved.
I would like to have the ListCtrl scroll down to a selected value. In some
previous releases this was easily accomplished with a SetItemState(no,
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) approach. That hasn't worked for
quite a while.
In the wxListCtrl demo, if the value 5 is changed to 25 in line 93 ie.
self.list.SetItemState(25, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) the
problem is illustrated. The value is selected but no effect on the scroll
value.
What is the suggested approach if this is not workable from now on?
I use this:
self.EnsureVisible( i )
self.SetItemState( i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED )