Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding a read only control from count
Message
From
14/05/1998 16:38:01
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
12/05/1998 17:22:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098865
Message ID:
00099587
Views:
18
>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).

I do that, but I really have a custom property for all of my classes, which is called .say (for mental compatibility reasons, because I've never really used SAY on a variable on a form in FPD, it was always Get Disable, so it could Show Get). Then when I do a run like that, it goes like this:
for zz=1 to alen(this.tabf)
with thisform.controls(this.tabf[zz])
.enabled=!.say
endwith
endf

In my case, tabf[ ] is an array property on the form class used to hold some indexes into the form.controls[ ] array (i.e. only those which are bound, belong to one of my classes, and have a .say property; they can be checked directly instead (running for zz=1 to thisform.columncount), but I prefer to have them enumerated at form.init() time, because of speed and the array being used elsewhere, too. This is probably not exactly what you need, but I HTH as a hint.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform