>LstSetSelection() is documented to scroll the list to the selection, if
>necessary. However, in the sequence above, it DOES select them item but DOES
>NOT scroll to it. I suspect that this is because the form has not been drawn
>yet.

That's true; it doesn't scroll (or draw) if the object isn't both usable
and visible.  I'll tell the documentation folk to clarify that.

Steve's suggestion about calling LstSetTopItem was a good one.


>While handling frmOpenEvent:
>1. Set the list's drawing callback function.
>2. Set the number of items in the list.
>3. Use LstSetSelection to set the selected item.

3a. Call LstSetTopItem to restore scrolling to what it was before (or
perhaps center the selected item, whichever is more helpful to the user.)

>4. Draw the form.


-David Fedor
Palm Developer Support

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to