Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically set pageframe's activepage
Message
From
26/11/1997 02:32:44
 
 
To
25/11/1997 17:06:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00061633
Message ID:
00062347
Views:
39
>>>>>>>>>Is there a way to set the Activepage property WHEN certain page in a pageframe looses focus? There isn't a LostFocus event for a page in a pageframe so how? I have a 2 page pageframe and when one of the page looses focus I would like to set the Activepage to the other page without manually clicking something (e.g. pageframe tab, command button, etc.).
>>>>>>>>>
>>>>>>>>>TIA
>>>>>>>>>John.
>>>>>>>>You can use the deactivate event of the page...
>>>>>>>Ken,
>>>>>>>I've tried using deactivate event of the pageframe w/o success. How would you do this?
>>>>>>>
>>>>>>>John.
>>>>>>When you say 'Loses Focus', do you mean if the user Tabs out of the last control of the page, clicks on an object not contained in the page, or clicks on the next page tab? Knowing better about what you are trying to accomplish, would be help to me.
>>>>>
>>>>>Ken.
>>>>>When I said 'loses focus' I meant in my case when the user clicks on an object not in the pageframe container. I apologize for not being more clear Ken.
>>>>>
>>>>>John.
>>>>
>>>>Sorry for interruption. This sould give an idea to proceed:
>>>>***Page.Deactivate event
>>>>if messagebox("Change Page?",4+32)<>6
>>>> this.parent.activepage=this.pageorder
>>>> nodefault
>>>>endif
>>>
>>>Ed,
>>>I think this might be user intervention that he is trying to avoid. Wouldn't it be better to somehow determine where the Click Event is occurring and IF not in the PageFrame, set .PageFrame.ActivePage to equal preferred page?
>>
>>No, i added messagebox just for illustration purposes. In reality, 'IF' should check some variables/properties to prevent or not page change.
>
>I would have to play with the idea somewhat, but I would create a form method with parameters to determine if the object clicked is inside the pageframe or not. IF NOT set the activepage.
Ken.
I've already though about similar idea (actually, I had no other idea but this) of including code in GotFocus event of all other objects not in the the pageframe to set the activepage but decided against this. It might do the job but all the code spread across all those objects is not, IMHO, a good technique for many reasons.
For some reason, this is turning out to be a bigger headache than it should be. Still searching for easier way...

John.
It's "my" world. You're just living in it.
Previous
Reply
Map
View

Click here to load this message in the networking platform