thanks Thomas, I wasn't aware of the scrollIntoView() method on the
Element class, that sounds perfect - i'll give it a whirl tonight but
that's the API solution for sure.

cheers

On Aug 25, 5:21 am, Thomas Broyer <[email protected]> wrote:
> On 25 août, 04:03, ross <[email protected]> wrote:
>
>
>
>
>
> > Hey ya'll,
>
> > I'm trying to design a view using 2.1.0m2 and i'm playing around with
> > a very basic CellList inside a ScrollPanel:
>
> >         <g:ScrollPanel ui:field='scrollPanel' >
> >             <c:CellList ui:field='actionList' />
> >         </g:ScrollPanel>
>
> > Basically, I want to be able to scroll programatically to the
> > SelectedObject of my SingleSelectionModel, which might be out of view
> > because I am dynamically adding items to the java.util.List backing my
> > ListViewAdapter.
>
> > Any ideas how to do this?  Since Cell does not derive from UiObject I
> > can't find anything obvious to use.  I'd like something along the
> > lines of ScrollPanel.ensureVisible(Cell) but I don't know if that is
> > even possible?
>
> Well, a Cell is clearly not the object to use, as a Cell is a renderer
> (i.e. a Cell does not have a value, it renders values)
>
> How about using
> cellList.getRowElement(selectedIndex).scrollIntoView() ? (with
> selectedIndex probably being
> cellList.getDisplayedItems().indexOf(selectionModel.getSelectedObject()))

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to