Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Label Class
Message
De
23/04/2004 07:48:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/04/2004 07:37:14
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00897519
Message ID:
00897521
Vues:
12
>How can I create a label to be used on a main static form and the caption be defined in another from or program on the fly?

If you have a reference to 'main' form you could do that. To have the reference simple way is to use name clause :

public frmMain
do form mainForm name frmMain

* Anywhere then : frmMain.myLabel.Caption = 'MyCaption'

Probably instead of public you'd want to use oApp custom object as storage.

If you didn't create it that way then you might still find it browsing the form objects (something like):
for ix=1 to _vfp.objects.count
  with _vfp.objects(m.ix)
    if lower(.baseclass) == 'form' and ;
         sys(1271,_vfp.objects(m.ix)) = mySCXName
         .myCaption = 'Caption'
    endif
  endwith
endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform