Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding a read only control from count
Message
From
14/05/1998 14:43:30
 
 
To
12/05/1998 17:22:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098865
Message ID:
00099525
Views:
27
>Can anyone tell me whether it's possible to 'hide' a control on a form so that it is not counted in a control count? This issue has arisen because a query I'm working with tries to use all of the controls on the form in its count and display, and I have several at the top which are for read only purposes (and from another table besides).
>
>Thanks for your help.
>
>Sylvia

You can always count this number of controls. Following is simplified example (it should be extended for container controls):
local nNotReadonlyCount
nNotReadonlyCount=0
for n=1 to thisform.controlcount
	if type("thisform.controls(n).readonly")="L"
		if thisform.controls(n).readonly=.f.
			nNotReadonlyCount=nNotReadonlyCount+1
		endif
	endif
endfor
=messagebox("Total Controls Counted: "+str(nNotReadonlyCount))
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform