Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enable and Disable Inlist
Message
De
05/10/2005 12:14:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/10/2005 12:04:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01056317
Message ID:
01056335
Vues:
16
>Cetin,
>So if I am trying to disable txtfstname and txtlstname would I say it like this?
>
>THISFORM.PAGEFRAME1.PAGE3.SetAll('ENABLED', !(this.Value=1),'TXTFSTNAME','TXTLSTNAME')?
>
>Jon

No, the syntax I sent enables/disables all textboxes that have class "TextBox" (those that are directly subclassed form Textbox class).
I think you want something different. Not all but only those which names match to a list? Something like:
lcEnabDisabList = 'TXTFSTNAME,TXTLSTNAME'
for ix = 1 to alines(aMemberNames,m.lcEnabDisabList,.t.,',')
 store !(this.Value=1) to ('THISFORM.PAGEFRAME1.PAGE3.'+aMemberNames[m.ix]+'.Enabled')
* or for multiple property setting
*with evaluate('THISFORM.PAGEFRAME1.PAGE3.'+aMemberNames[m.ix])
* .Enabled = !(this.Value=1)
*endwith
endfor
PS: Inlist has a parameter count limit. Using a string like this you don't have that limit.
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