Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with EVALUATE()
Message
From
26/02/2006 05:28:20
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
To
26/02/2006 03:06:21
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01099237
Message ID:
01099250
Views:
11
>>Hi all,
>>I have a problem with =EVALUATE()
>>I have a form with one grid in it.
>>I put below code in a method ( SetGridEnabled ) and run it where i want.
>>
>>
>>FOR nCounter = 1 TO 4
>>    = EVALUATE("thisform.grid1.column"+ALLTRIM(STR(nCounter))+".Enabled = .F.")
>>    = EVALUATE("thisform.grid1.column"+ALLTRIM(STR(nCounter))+".text1.Enabled = .F.")
>>ENDFOR
>>
>>
>>but it is not worked.
>>if i use this as below
>>
>>
>>thisform.grid1.column1.Enabled = .F.
>>* other column
>>
>>
>>it worked.
>>WHY?
>
>EVAL() evaluate a expression, set a property is a command.
>
>When you set column's enabled, VFP copy the value into the column's control ( text )
>
>But you can use columns collection:
>
>with thisform.grid1
> FOR nCounter = 1 TO 4
>    .columns[m.nCounter].Enabled = .F.
> ENDFOR
>endwith
>* for all columns you can set
>thisform.grid1.Enabled = .F. && this set all columns and textboxes
>
Dear Fabio,
if i use from
thisform.grid1.Enabled = .F. && this set all columns and textboxes
user can not scroll in grid. i want my user can scroll but can not edit values.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform