ListBox ensureItemIsVisible not behaving as expected
Posted: Mon Nov 10, 2008 07:10
Hi
I have a long list of animation keyframes in a listbox. As the animation plays through, each successive keyframe is selected and i want the selected keyframe to be visible in the list.
I'm using ensureItemIsVisible except there is still a problem. This method seems to put the selected item always at the bottom of the list. This can be a problem if, say, the selected item is already visible and/or the user tries to scroll down the list while playing.
That is, if the item is already visible then i don't want the list to scroll (which it does). The list should move only if the item is not already shown.
I have a long list of animation keyframes in a listbox. As the animation plays through, each successive keyframe is selected and i want the selected keyframe to be visible in the list.
I'm using ensureItemIsVisible except there is still a problem. This method seems to put the selected item always at the bottom of the list. This can be a problem if, say, the selected item is already visible and/or the user tries to scroll down the list while playing.
That is, if the item is already visible then i don't want the list to scroll (which it does). The list should move only if the item is not already shown.