>Erik
>
>Since my last message, I have more time to think about your suggestion. This is the type of behaviour that I would always want on all pageframes. Therefore, I think I will put this Keypress code in my "parent" form class. Given that every subclass will then inherit this behaviour, I really need to be sure that this code only fires when the user is using a form where there is a pageframe. I could also use a pageframe in a pageframe. What is the best way to achieve this? What is the best approach to examine the containership to establish whether presumably the current object is contained in a pageframe?
>
>TIA
You can use something like (incomplete)
IF LOWER(THIS.ActiveControl.BaseClass) = "pageframe" OR LOWER(THIS.ActiveControl.Parent.BaseClass) = "pageFrame"
This wouldn't get you all the way up the hierarchy, but it would do for most forms...
Another approach would be to let the pageframes ahdle it. I mean you would still have to put code in the form.keypress to trigger it, but you could create a method in your pageframe class that received a one or a -1 as a parameter and decided whether or not it had the focus and to increment or decrement the page or to pass the message on to a pageframe within..
Erik Moore
Clientelligence