Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbars
Message
From
19/12/2001 06:53:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/12/2001 06:44:41
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00596029
Message ID:
00596033
Views:
20
>Hi Guys
> Well now I am trying to put a toolbar on a top level form. In my toolbar
>class I have show window set to in top level form. In the forms init method
>I have the code :
>
>DO mnuMain.mpr WITH this
>This.AddObject("oTbar","tbrMain")
>oTBar.Visible = .t.
>oTBar.Dock(0)
>oTbar.Show()
>
>When I run the form I get the error [Object class is invalid for this container].
>
>Can anybody help. Thanks

Some objects can be included within others, some not.

A tool can only exist independently, similar to a form.

You have to create it separately:
oTBar = CreateObject("oTbar")
oTBar.Show()
If you want to make the toolbar visible only when your form is on top, you have to do some additional programming (like in Form.Activate() and Form.Deactivate()).

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform