Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Methods with PgUp andPgDn.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00012052
Message ID:
00012076
Views:
35
>>Hi guys !!,
>>I have a form with a pageframe which has 5 pages.
>>I want to be able to let the user switch pages with
>>the "page up" and "page down" keys. I tried
>>creating a method that accept a numeric parameter
>>1 and -1 to increase or decrease the current
>>active page and then make the previous or next one current,in the load event of the form I have this
>>ON KEY LABEL PGUP DO trap_key WITH -1
>>ON KEY LABEL PGDN DO trap_key WITH 1
>>but when I press the PgUp or PgDn Key it tells me
>>program trap_key.prg not found. How can I call a
>>method with PgUp and PgDn ?
>>Any sugestion will be apreciated ?
>>Thanks in advance.
>
>Use ON KEY LABEL ... MyForm.trapkey(1). Test it, please! If it will not work you have to create procedure with again the same line of code.

Thanks a lot Edward, I did that in the init and also tried in the
load event of the form :
ON KEY LABEL PGUP THISFORM.trap_key(1)
and it didn't like it, it returned me :
"thisform can only be used in a method"
So I went with the solution tha Dorris sugested me.
Now I don't know why after setting my current page it doesn't refresh
the fields that I have in that page, and after setting the current
page I do a "MyForm.pageframe1.refresh", it is suppose to refresh
the current page, isn't it?.
Thanks again.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform