Check box and disabling fields

belsha

Registered User.
Local time
Today, 04:47
Joined
Jul 5, 2002
Messages
115
I have a checkbox that asks if a person is in the program. If this box goes unchecked, I want a number of fields following to be disabled and focus to go to the next section. I know how to code this, however, the question is..If a person tabs into this and then out without entering anything, it doesn't work. If you check yes, then take the check out, the fields disable appropriately. Thought about an option group, or using a default Yes, in program, which would then disable fields if unchecked. (although I dislike defaults). Advice? Also, is there anything that would cause focus to go to the label of a checkbox control instead of to the checkbox itself? I have checked the tab stops and indexes. Thanks!
 
If they tab through, you could use the lostfocus event of the check box, or set the default as checked, or set the default as unchecked and disabled on the other controls (so they have to check it to re-enable them).
 
Checkbox question

I decided to use the default yes (checked) and then they have to uncheck it and the boxes disable. Works great. Only question is a checkbox further down in that section I would like to grey out (I set the backcolor property of other textboxes in that section to grey if they were disabled) but it seems as if textboxes have no backcolor property and if I say visible=no it makes the label invisible also. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom