Skip to main content

List scrolling

2 replies [Last post]
Anonymous

I'm having some serious issues getting the scrolling in a list to behave.

I have a list box with a custom model and renderer. I also push a new form
onto the screen when an element is clicked.

If I use a border layout, initially, the list box is fine. The list box is
located in the center and it just works. If I push a form that represents
an element, the list now occupies more real estate. That's not particularly
problematic but scrolling now doesn't follow the selected element. If the
element that is selected happens to be on screen, I can see it, but if I
scroll down (or up) to an element that isn't on screen, the selected element
is no longer visible.

I've also tried using a box layout to no avail. When using a box layout, I
don't need to push a new form and come back to see the bad behavior. I
scroll down the list and when the elements go off screen, the list doesn't
follow the selected element, so I have no idea which element is actually
selected.

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chen

try Form.setScrollable(false)

Regards,
Chen

Patrick Julien wrote:
> I'm having some serious issues getting the scrolling in a list to
> behave.
>
> I have a list box with a custom model and renderer. I also push a new
> form onto the screen when an element is clicked.
>
> If I use a border layout, initially, the list box is fine. The list
> box is located in the center and it just works. If I push a form that
> represents an element, the list now occupies more real estate. That's
> not particularly problematic but scrolling now doesn't follow the
> selected element. If the element that is selected happens to be on
> screen, I can see it, but if I scroll down (or up) to an element that
> isn't on screen, the selected element is no longer visible.
>
> I've also tried using a box layout to no avail. When using a box
> layout, I don't need to push a new form and come back to see the bad
> behavior. I scroll down the list and when the elements go off screen,
> the list doesn't follow the selected element, so I have no idea which
> element is actually selected.
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Patrick Julien

beautiful.

On Wed, Jul 23, 2008 at 10:55 AM, chen wrote:

> try Form.setScrollable(false)
>
> Regards,
> Chen
>
>
> Patrick Julien wrote:
>
>> I'm having some serious issues getting the scrolling in a list to behave.
>> I have a list box with a custom model and renderer. I also push a new
>> form onto the screen when an element is clicked.
>>
>> If I use a border layout, initially, the list box is fine. The list box
>> is located in the center and it just works. If I push a form that
>> represents an element, the list now occupies more real estate. That's not
>> particularly problematic but scrolling now doesn't follow the selected
>> element. If the element that is selected happens to be on screen, I can see
>> it, but if I scroll down (or up) to an element that isn't on screen, the
>> selected element is no longer visible.
>>
>> I've also tried using a box layout to no avail. When using a box layout,
>> I don't need to push a new form and come back to see the bad behavior. I
>> scroll down the list and when the elements go off screen, the list doesn't
>> follow the selected element, so I have no idea which element is actually
>> selected.
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]