Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding objects to application object
Message
De
12/12/2001 23:57:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/12/2001 04:38:02
Jonathan Hayton
Cbl Business Solutions Limited
Leeds, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00592556
Message ID:
00593711
Vues:
28
>Hi,
>
>Could anybody give a quick indication to how to add toolbars to the application object created with the application wizard, I need to knock up a quick prototype and thought if I used the application wizard, added a few toolbars, menus and forms this would prove to be quicker but I can't figure out how the toolbars get added to forms, is this all in the form mediator object ?
>
>Any help would be greatly appreciated as I could do with getting this prototype out before the Xmas break.

Seems to be nobody's using app wizard around here. One thing you could do is to have a toolbar class, and make sure it's not visible, i.e.

oApp.newobject("oToolBar","mytoolbars.vcx")

than in the form class just have in the .activate

oApp.oToolbar.visible=.t.

Don't know how does the app wizard's toolbar work (nor how would yours work), but the buttons on it usually call some standard methods in the currently active form, i.e. they usually check if _screen.activeform is a form, and then get an object reference to it. You could add a property to your toolbar, say oFormRef, and in form's Activate add

oApp.oToolbar.oFormRef=this

so this would remove the need to have the check done. Of course, this is all just quick'n'dirty - you'd need a way to switch between two open forms, make sure toolbar gets hidden when there's no active form (in form's destroy?) and make sure it gets released when you kill the oApp.

Again, not really ever having taken a look at how does the app wizard work, can't even guarantee this would work - this is just to get you started.
HTH

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform