Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior of the CheckBox
Message
From
01/04/2003 08:19:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/04/2003 00:52:42
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00771927
Message ID:
00772346
Views:
9
>Hi Hilmar,
>I really appreciate your help and commitment to share the knowledge. Your FAQ shows a nice way to handle the similar controls on the form.
>I am designing a form for the monthly attendance. Each CheckBox is having caption as either P for Present and A for absent. Based on the status of the CheckBox, I am calculating the total absenteeism amount. What I did was, I created a class for a single CheckBox and added all calculations in the Click event. Then I Created 31 instances of the class on my form. As shown in your FAQ, I am using the macro substitution. Based on the number of days in the month, I am activating/deactivating the controls.
>Now, i will try the same thing with an array. Once again, Thanks a lot.
>Yashodhan.

I think macro substitution is OK - there is no need to change your existing code. In fact, while I don't see any problems with my array code, several other programmers have expressed discomfort with it - mainly based on the fact that it seems to rely on undocumented features (which means, it is not guaranteed to work in future versions).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform