Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbars
Message
From
19/12/2001 07:16:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/12/2001 06:53:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00596029
Message ID:
00596037
Views:
21
>>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 use variable oTBar, the toolbar will be killed as soon as the variable goes out of scope.

If you want to "attach" the toolbar to a form, you may want to use a form property instead. The toolbar will automatically be destroyed with the form.

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
Reply
Map
View

Click here to load this message in the networking platform