Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'This.Parent.Property' resolution
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00622707
Message ID:
00622715
Vues:
26
>I'm not sure if I'm doing something wrong or what ... probably something stupid that I'm just not seeing!
>
>I created a new class as a subclass of the VFP Container class. Into the container I dropped a textbox and a label, and a new property of the container, cCaption. The label object has its Caption property set to the cCaption property of the container thusly:
>
> =This.Parent.cCaption
>
>In my base class, I set the value of cCaption to "Caption" just to make the label visible.
>
>I then subclassed this container a couple of times, and dropped several of these subclassed objects onto a form. I set the cCaption property of each of the container objects to the desired string. Instead of seeing the strings I had placed in the individual Container.cCaption properties, the form shows "Caption" (from the base class) in each one. If I go into the label object of the individual containers, select the Caption property, and then hit the "enter" key, so as to override the default, then the desired label caption shows up ... even though the reference is exactly the same, except that it is now in boldface type.
>
>Any ideas on what I should do differently?
>
>Thanks!

Put :

this.Caption=This.Parent.cCaption

in init of label.
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