Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Scrollable areas
Fri, Apr 26 2013 5:57 AMPermanent Link

Matthew Jones

I need to display a list within an area of the display. It will probably need to be
nicely scrollable within that area. And it needs to work well on mobile devices.
Thus I have some questions:

1. Is the TListBox converted to something "smart" on the iPhone? I'm not sure I
want such.
2. Could I use mouse down and drag on a TPanel to shuffle TLabels and other around?
3. Is there any other way of showing a scrolling content in an area?

Hmm, I wonder about putting a whole new form for the list. Would that help?

/Matthew Jones/
Fri, Apr 26 2013 6:36 AMPermanent Link

Matthew Jones

> 3. Is there any other way of showing a scrolling content in an area?
>
> Hmm, I wonder about putting a whole new form for the list. Would
> that help?

Well, to report back, I created a new form, turned on vertical scroll bars, stuck a
TLabel on with Autosize on, set its width to get it to only size vertically, and it
all comes out nicely. On the iPhone, the area uses the usual area scroll, so I can
access it okay.

I love EWB - I was expecting things to be so crude, but it keeps surprising me with
its capability.

/Matthew Jones/
Fri, Apr 26 2013 7:25 AMPermanent Link

Matthew Jones

This brings up an issue with focus though, that I'd appreciate help on.

My form appears, and can scroll. I had the close button for the form visible, so
you can close it, but I figured it would be handy to have a Close button at the
bottom too, so you don't have to scroll all the way up again to close the window.
However, since the Close button is the only input on the form, it gets the focus,
and that means that the form appears already scrolled to the bottom.

If I put another button at the top with the tabindex of 0, then it all works, but
I'd rather not do that. If I hide it, back to the original problem.

I tried a timer to make the button invisible initially, but as soon as it appears
the form jumps.

I'm aware of the "ScrollTop := 0;" option but I don't fully understand it, and it
doesn't help anyway. Hmm, no, it does. When added to the timer, it is working. Okay,
that is workable, but I'd like to understand it better if anyone can educate me.

/Matthew Jones/
Mon, Apr 29 2013 12:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< My form appears, and can scroll. I had the close button for the form
visible, so you can close it, but I figured it would be handy to have a
Close button at the bottom too, so you don't have to scroll all the way up
again to close the window. However, since the Close button is the only input
on the form, it gets the focus, and that means that the form appears already
scrolled to the bottom. >>

Yeah, I don't know who came up with some of these "features" in the
browsers, but the focus functionality is one of the worst offenders.  IE
gets even sillier, and is the primary reason why I needed to rewrite the
event management in EWB for 1.02.

<< I'm aware of the "ScrollTop := 0;" option but I don't fully understand
it, and it doesn't help anyway. Hmm, no, it does. When added to the timer,
it is working. Okay, that is workable, but I'd like to understand it better
if anyone can educate me. >>

What I would suggest is to simply use a Boolean flag that indicates whether
you've done the "re-scroll" or not yet, and deal with it in the OnEnter
event handler for the button (setting ScrollTop:=0).  That should work and
not force you to rely on a timer.

Tim Young
Elevate Software
www.elevatesoft.com
Image