Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding a read only control from count
Message
From
13/05/1998 15:46:09
 
 
To
12/05/1998 17:22:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098865
Message ID:
00099182
Views:
22
>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).

As far as I know - that can't be done.
Controls will always appear in the controls[] collection.

What you *could* do is make your own array of controls, but only add a control to it if its .ReadOnly property is false.
Also you could check the .ControlSource property and exclude controls that aren't pointig to the right table.

If you do this, don't forget you are responsible for clearing out all these object references to .NULL. so that the form can unload and close properly !! I use my own custom Setup() method to build arrays like this, and a Cleanup() method to tidy up after me.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform