View Full Version : [FIXED] scrollIntoView
22 Jul 2008, 6:42 AM
scrollIntoView in a DataView doesn't work. Easy to see this in a ComboBox where the popup contains a scroll bar. As you press the down arrow key, the next item gets selected but it'll go right past the visible area without scrolling.
I noticed that the code in the base class... sorry, I don't remember which class, has
everything commented out for scrollIntoView.
Any thoughts on when this will be done?
22 Jul 2008, 8:28 AM
Fix is in SVN.
22 Jul 2008, 2:45 PM
8 Aug 2008, 4:47 PM
Seems to work fine in 1.0.2 for ComboBox. But it doesn't seem to work
when there's simply a DataView in a LayoutContainer with scroll mode
set to AUTO.
Sorry I didn't provide code -- but I'm wondering if this use of scrollIntoView
has been validated? If so, can you provide a simple example. It's certainly
possible I've done something wrong, but not sure where.
12 Aug 2008, 12:19 PM
Scroll into view will not work if is the DataView's parent container that is scrolling. The DataView itself should be scrolling.
12 Aug 2008, 12:45 PM
There is no way to set the scroll mode on a DataView. I have the scroll mode set to Scoll.Auto on the parent LayoutContainer, and I am calling scrollIntoView on the DataView instance, passing the DataViewItem I wan't to be visible as the parameter. It doesn't work. Am I doing it wrong?
12 Aug 2008, 1:33 PM
A very critical part of this was missing. I looked at the ComboBox code to figure it out. The base scrollIntoView code does not do the job. I had to override that method in my DataView in order to pass it the scrolling parent. It works, but I don't think it should work that way. The scrollIntoView should grab the parent on its own IMHO.
Anyway, all is working now.
12 Aug 2008, 5:11 PM
DataView extends Container which is wrong. I have changed DataView to extend ScrollContainer. Change is in SVN.
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.