Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refering to objects in a container
Message
De
06/07/1999 12:34:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/07/1999 12:25:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00237815
Message ID:
00237821
Vues:
14
>I made a container that has a command button and a grid in it.
>
>I want to refer to the grid from the command button, but I am unsure how to do that. Do I use something like this::mygrid.property?
>
>How do I know that mygrid won't suffer a name change?

this.parent.mygrid.someproperty
If you change the grid name you would do that in class so change in code too. Otherwise to be free of name you would do something like :
with this.parent
   for each oControl in this.controls
      if oControl.baseclass = "Grid" && Found grid
           oControl.SomeProperty = Something
          exit
      endif
   endfor
endwith
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform