Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Toolbars
Message
De
19/12/2001 06:53:48
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/12/2001 06:44:41
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00596029
Message ID:
00596033
Vues:
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 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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform