General information
Category:
Forms & Form designer
>>Try This
>>
>>For i=1 to thisform.controlcount
>> thisform.controls(i).dowhatever
>>Endfor
>
>I like that idea. Then I can put an IF in the loop to exclude ones I don't want.
However, this code doesn't drill down into containers. For that, I use this:
********************************************************
* calls a method of each of a container's objects
* returns immediately if any return .F.
*
procedure ForEach(tcnt, tcMethod)
local lctrl
for each lctrl in tcnt.Controls
if PEMStatus(lctrl, tcMethod, 5)
if !lctrl.&tcMethod.()
return .F.
endif
endif
if lctrl.BaseClass == "Container"
if !ForEach(lctrl, tcMethod)
return .F.
endif
endif
endfor
return .T.
This calls a method, but you can adapt it to set properties.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only