Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Property of an object
Message
 
 
À
31/07/2001 09:47:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00537719
Message ID:
00537730
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
Hi!

As I said, there are no such thing as default property in VFP. Instead I posted an approach how you can define your class(es) to simulate the same thing on the programming level.

>>Hi!
>>
>>No. You can define property TextBox, than add object TextBox. Property will return value when Accessing TextBox as object will work with object. Than in the textBox_Assign method you define what to return from TextBox object. But this is with use of the parent container only...
>>
>>>Hi all,
>>>
>>>Is there a way to assign a default property to an object in VFP? In VB, this is possible:
Form.Textbox = Form.Textbox.Text
>>>
>>>Thanks,
>
>I probably mistated my question. In VB you can get the value of the default property of an object without bothering to use the property name:
>
>Example:
>
>dim x as string
>
>' any of the following line of codes is valid
>set x = Form.Textbox
>set x = Form.Textbox.Text
>
>' both will return the value of the default property which is .Text
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform