Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scrolling a Page

2 views
Skip to first unread message

Terry McNamee

unread,
Jun 1, 2005, 7:56:41 PM6/1/05
to
I'm having a problem scrolling a page with labels on it. Basically all my
other pages scroll perfectly, I have textboxes on them and i check if they
have focus. If they have, i then check to see if they are in view of the
client window.

The problem I have is when i check the focus of the label. One panel i have
contains only labels, and i can't seem to scroll down the page like my other
forms. Can you determine if a label has focus, or does this only work for
textbox ?

Many thanks.


riki

unread,
Jun 2, 2005, 4:32:54 AM6/2/05
to
Smartphone will only scroll to controls with the WS_TABSTOP window style
(i'm using a native code example), so you need to create, either all
the labels with that style, or just the last one on the page.

riki

Should you immerse yourself in the fluidity of life, only to drown in
its revelations?
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
By Day: http://www.EmbeddedFusion.com

Terry McNamee

unread,
Jun 2, 2005, 5:29:57 AM6/2/05
to
Thanks Riki,

Can this be done in C # ??

I'm not too sure how you would do it.


"riki" <see_my_home@page> wrote in message
news:exxNu20Z...@tk2msftngp13.phx.gbl...

Neil Enns [MSFT]

unread,
Jun 2, 2005, 11:10:18 AM6/2/05
to
In C# you can't use Riki's approach. You actually have to implement the
scrolling yourself. I've done this in CF V2 by catching the Form's KeyPress
(or is it KeyDown?) event, looking for the up/down arrow keys, and then
adjusting the AutoScrollPosition of the form. I'm not sure if this works in
V1 of the framework though.

When setting AutoScrollPosition it's really funky. You have to do:

this.AutoScrollPosition = new
Point(this.AutoScrollPosition.X, -this.AutoScrollPosition.Y - 12)

if I remember right. The offsets are negative, which always messes me up.

--
Neil Enns
Program Manager
Microsoft Visual Studio for Devices

This posting is provided "AS IS" with no warranties, and confers no rights.
"Terry McNamee" <n/a> wrote in message
news:OO0ymW1...@TK2MSFTNGP09.phx.gbl...

0 new messages