Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox disabled

Status
Not open for further replies.

extempore

Programmer
Jun 1, 2001
71
0
0
US
Can anyone tell me the trick of making a checkbox disabled?

Thanks

Extempore
 
Meaning it remains white and not grayed out...hope this makes it clear.
 
You're likely already aware that the standard checkbox control has a property called "enabled". In a script it can be set as follows:

cb_1.Enabled = TRUE

Setting it to FALSE, disables the control, and thus does not allow the user to change its value (checking or unchecking). The visual cue to the user that he/she cannot check or uncheck the checkbox is that the control is "greyed out". You can likely change these default visual characteristics by setting the backcolor, text, and border properties to the values that they had prior to setting the enabled property to FALSE. However, having already said that the visual cue to the user that the control is not modifiable, is by it being greyed out - I wouldn't recommend changing these visual properties. I think that it will more consistant for the user (as it is for most users), that the control remain greyed out when its enable property is set to FALSE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top