Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect Toolbar button to a form
Message
 
À
14/04/2003 09:33:03
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00777177
Message ID:
00777183
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>I would like to create a new toolbar button on the applications main toolbar and have it invoke a method on the active form. How do I set that up?
>
>I've been doing some investigation, but I'm not sure where I should put the code. Lets say I want to define a new method "mymethod"
>
>.statemanager.DefineAction('Form Mymethod', 'mymethod')
>
>Furthermore, once I get to that point, how will I enable & disable the button from the form level?


Steve,

If you want to have this method available to several forms throughout the application, the app object has a CreateStates() method for defining global state and actions. Put your DefineAction code there. Then, whenever the active form contains a method named mymethod, the button will be active. If the active form doesn't have the method, the button will be disabled.

HTH
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform