Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Hi again David.
>I thought I'd let you and others know that I now have a generic solution. My toolbar buttons and menu objects will all by default call a "focusshift()" method in the form which must return .t. or the action doesn't occur. This method uses a special "off-form", "no tabstop" button which it attempts to setfocus() to. If that button then has the focus then all is well and I proceed to the action. This has the advantage that it traps ALL VFP and coded events associated with moving the focus including the native date validation. So clicking on the toolbar or choosing a menu item can be identical to clicking another button on the form. Works great for me.
>And it removes focus from the grid, so no alias problems.
>And it automatically updates the controlsource before the valid() fires.
>Focus is restored automatically when the action is complete.
Always useful to read others' threads on UT. Always something to grasp.
Clearly stated and helpful. Thank you
François
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement