Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Allow setting of default value when creating a property
Message
De
08/08/2002 03:09:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/08/2002 02:36:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00687375
Message ID:
00687401
Vues:
15
>>>>>I haven't found it. I was wondering if there is a way to assign a default value when creating a property from the form designer. From the menu, I click on Property to create a new property. However, in that form, I don't see any way to enter a default value.
>>>>
>>>>You assing the value via the property sheet...
>>>
>>>Yes, and that's why I wanted to know if there was a way to do it from the "Create property" form. All the time, I have to create the properties. Then, I have to remember the ones I have added and put their default values in the property sheet after. I just posted a wish list entry for that. I think this would be nice.
>>
>>In a prg class, you can do it directly.
>>In a visual class (or a form) you have to do it via the property sheet
>>or programmaticaly in the init of the control or form.
>>You can also use the access method of the property to return a default
>>value if the property was not initialized...
>
>Yes, those are all good. But, I still think this would be a nice feature to add.

PMFJI, dialog doesn't support it (and I hate it) but there is a workaround I use. From the form in designer I go to command window and execute code like this :

ASELOBJ(arrFrm,1)
arrFrm[1].Addproperty('prop1',5)
arrFrm[1].Addproperty('prop2','hello')
arrFrm[1].Addproperty('prop3',DATE())

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