This is a migrated thread and some comments may be shown as answers.

Control scroll position of listbox

1 Answer 44 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
brad
Top achievements
Rank 1
brad asked on 01 Aug 2010, 06:20 AM
Is it possible to control the scroll position of a listbox to ensure, for example, that the selected item is displayed/visible?

Thanks,

Brad Smith

1 Answer, 1 is accepted

Sort by
0
brad
Top achievements
Rank 1
answered on 01 Aug 2010, 06:24 AM
Silly me.  Should have searched first.  

function selectedIndexChanged(sender, args)
{
    var item = args.get_item();
    item.scrollIntoView();
}



--Brad
Tags
ListBox
Asked by
brad
Top achievements
Rank 1
Answers by
brad
Top achievements
Rank 1
Share this question
or