5 way navigator support on a field

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

5 way navigator support on a field

berrdolagas
Hello, it's me again! How can i tell a program to scroll up and down
trough a field??





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

RE: 5 way navigator support on a field

Emil Tchekov-3
Hi,
> Hello, it's me again! How can i tell a program to
> scroll up and down
> trough a field??

I suppose you mean text field...

Here is what you need:

if e==keyDown then

        if id==11 or id==31 then
                CurPos=CurPos-100
                       
                if CurPos<1 then
                        CurPos=strlen(pgettext(Textbox))
                end
        end
               
        if id==12 or id==32 then
                CurPos=CurPos+100
                if CurPos>strlen(pgettext(Textbox)) then
                        CurPos=1
                end
        end
               
        psetstate(Textbox,CurPos)

end if


This example needs text field with ID "Textbox".
"e" and "id" comes from the "pevent" loop.
This IF block must be placed within the loop or in a
event handling routine that gets e and id from the
there.
Scrolls with step 100 Chars (change this value to
reach the scroll speed that is suitable for your app).
If the end is reached it jumps again to the begining
(you can change this behaviuor, so that if the user
reaches the end simply to stay there)

Hope this helps

Regards

Emil Tchekov


       

       
               
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/