Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simplest way to prevent Deactivate in the page's Click
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01027764
Message ID:
01027808
Vues:
15
>>>>>>Since you cannot prevent the Deactivate event itself from happening, one way would be to store the current active page number/name in a property in Activate() event, then in Deactivate() compare and conditionally execute/not execute the other Deactivate() code.
>>>>>
>>>>>This is what I'm trying to do, but it's not working. In the Deactivate you're still on that page. When you finish the Deactivate, you switch.
>>>>>
>>>>>Do you have other ideas?
>>>>>
>>>>>I have an idea of using shape or some controls like mhTab, etc., but it's too much work and I'd rather avoid this kind of complexity...
>>>>>
>>>>>You see, I need to work around a bug from MS. It seems like no simple workaround exist... I tried to code in the Click event, it doesn't help.
>>>>>
>>>>>Can you play with it a little bit, if you have a minute? Perhaps you can invent an elegant and simple solution.
>>>>>
>>>>>Thanks a lot in advance.
>>>>
>>>>Have you tried code in the UIEnable event of one of the controls on the page?
>>>
>>>Not yet. There is a special class in the framework, which is added in the form's run-time. I haven't looked deep into its code.
>>>
>>>Anyway, could you please elaborate more on your idea? I think it should work, but I'm not sure I see it clearly in my mind.
>>>
>>>Thanks a million in advance.
>>
>>When a page Activates/Deactivates, the UIEnable event fires with a parameter telling which was done. I use it all the time and I have it a particular base class of an object I put on every page. You could build the addition of this object to the pages in the PageFrame.Init().
>
>Let me study UIEnable event. The framework uses the exact same approach, e.g. it adds a special object to each page. Did you already have a workaround for this bug? Can you post your code, if it's not too much to ask?
>
>Thanks again for turning me in the right direction.

Fred is right. I forgot about my own class Page Tab Chameleon that works on UIEnable event and which I posted here in UT Downloads section in 1996 :) You may check the code in file#9211
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform