Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Toolbar in Top Level Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01198140
Message ID:
01198150
Vues:
15
Mark,

Only thing that confuses me about your question is the part about "stored in a FoxUser resource file". Any particular reason this isn't a class in a classlib/PRG somewhere?

Anyway, here's the code I use, in a method called OnFormActivate() which is bound to the Activate event of the top-level form. The ShowWindow property of the toolbar *must* be set to 1 (In Top-Level Form) for this approach to work. The "gotcha" that I found is you *cannot* use the oForm.AddProperty() method and then create the toolbar -- you must create the toolbar object and then use the ADDPROPERTY() function instead.
* If this is the initial activation,
* instantiate and position the Lat/Lon display toolbar
* (the oForm reference points to the top-level form,
*  to make it easier to call PEM's there from the toolbar)
*---------------------------------------------------------
IF THIS.ilFirstActivation
  oLatLon = NEWOBJECT("tbrLatLon", "MapTools", .NULL., oForm) 
  ADDPROPERTY(oForm, [ioLatLon], oLatLon)
  oForm.ioLatLon.Show()

ENDIF && THIS.ilFirstActivation
HTH. BTW, when did you move out to Midlothian?

>I have an app that uses a top level form. I also created a custom toolbar with the cut, copy, paste, undo and redo system buttons on it that I have stored in a foxuser resource file. How can I get this toolbar to appear in the TLF? If I toggle the _screen.visible to .T., I can see the toolbar in the _screen but can not get it into the TLF. TIA!
>
>Update: FAQ #13318 is not the answer to this one.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform