Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enable and Disable Inlist
Message
From
05/10/2005 12:14:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056317
Message ID:
01056335
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform