Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing toolbars
Message
De
11/07/2003 16:12:48
 
 
À
11/07/2003 01:49:47
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00808690
Message ID:
00809401
Vues:
31
Dear Dorin, my main toolbar contains calls to initialize forms of the application mainly, saving contents to files or email, and cut-copy-paste, so I am more concerned on form activation than on VCR buttons.

Thanks,
Javier.

>Usually, buttons on main toolbar only call methods of active form. I've created a form class with custom methods like AddNewRecord(),EditRecord(), Save(), Revert(), Print(),..., and custom properties.
>When a user click on the Add button on main toolbar, in its Click event code I have only _VFP.ActiveForm.AddNewRecord(), if Save button is clicked, in its click event code I have _VFP.ActiveForm.Save(). In Activate event of this form class I have code like this:
>
>WITH oApp.MainToolbarRef
>	IF this.Mode = 'view'
>		.cmdAddNew.Enabled = .t.
>		.cmdEdit.Enabled = .t.
>		.cmdDelete.Enabled = .t.
>		.cmdSave.Enabled = .f.
>		.cmdRevert.Enabled = .f.
>	ELSE
>		.cmdAddNew.Enabled = .f.
>		.cmdEdit.Enabled = .f.
>		.cmdDelete.Enabled = .f.
>		.cmdSave.Enabled = .t.
>		.cmdRevert.Enabled = .t.
>	ENDIF
>ENDWITH
>
>
>The form property Mode is set in AddNewRecord, EditRecord methods to 'add' or 'edit' and set back to 'view' after user choose to save or revert changes.
>
>The Tastrade application is built using something like this.
>
>
>>And how do you update cut-copy-paste buttons?
>>
>>Thanks,
>>Javier.
>>
>>>I have a reference to it stored in an application object property. Then, oApp.MainToolbarRef.Refresh is always possible when I need it.
>>>
>>>Dorin
>>>
>>>>I just wanted to know what is the recommended way to refresh a toolbar:
>>>>- Timer
>>>>- Inserting code in thisForm.init() and thisForm.destroy() methods.
>>>>
>>>>Thanks,
>>>>Javier Borrajo.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform