Information générale
Catégorie:
Gestionnaire de menu & Menus
>
>Valerie (and Bret) the reason for this is that if you click on a menu or toolbar button the focus in NOT removed from your activecontrol. As long as the focus is still there, the table.field value isn't updated to what's in the buffer.
>
>When you de-bugged, you changed the focus - so it worked correctly. Your SetFocus() workaround simple moves the focus an extra time. Another way to do this is to have an invisible object as part of your base form class. Every toolbar button sets focus to that object before calling its own code/action.
>
>HTH
>Barbara
Thanks Barbara. I had finally reached that conclusion by the end of the day yesterday (doesn't take ME long to figure something out -eh :)). Of course, I was wondering exactly what purpose it serves for a datum to actually have these two states of being -- Control.ControlSource and Control.Value? When would we ever want to recognize the difference between these two things? It means that we have to program AROUND it when using menus and toolbars, and we've got to recognize that our users will always expect that What You See Is What You Get.
Just my two cents.
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