Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding objects to application object
Message
From
12/12/2001 23:57:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/12/2001 04:38:02
Jonathan Hayton
Cbl Business Solutions Limited
Leeds, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00592556
Message ID:
00593711
Views:
26
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform