Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Toolbar - Help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00540571
Message ID:
00540596
Vues:
13
What I do is store an object reference to my toolbars in a property of my global app object [goApp]. Then when I need it, I just call a ToolbarShow() method of goApp. When it needs to disappear, I call a ToolbarHide() method in my goApp object. You can tie this to a form property as well, and put the ToolbarShow() in the Activate of your base form class, and ToolbarHide() in the Deactivate.

>I have made a generic toolbar class , with buttons like New, Edit Remove, email etc. -I have put the code which coordinates in custom methods of forms, like a custom method named _add - puts the form in 'append mode' etc. So all the tool bar would do, it call the associated forms custom methods.
>
>two concerns.
>
>Is it common to put that class into public memmoy from say a startup code , and make it visible when a form associated has something like a _hastoolbar propertity set to .t.
>
>or would it be better to have the forms which use it, have some code in the init method, creating the toolbar into memory. ? -then release it when the form is released - unloaded. ?
>
>My Trouble may not be in the toolbar itself, but in the way I currenly call form class's which is itself a custom method. which loads the form, and names it (not public) But what happens is if I load a form then the toolbar, I no longer have a handle -on the form which has been loaded. - Its there, but the only object var is the toolbar name in memory.
>
>Reading through the VFP docs I see they suggest making a formset, and putting both the form and toolbar in the formset, to handle this issue ..??
>
>Is that the only - or best way to get and keep a handle on two forms being active at one time. a toolbar and form class ?
>
>Thank you
>Bob Lee
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform