Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read only check box
Message
From
05/09/2001 16:27:54
 
 
To
05/09/2001 15:43:18
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00552763
Message ID:
00552798
Views:
14
>How to display read-only check box?
>Enabled property makes it too grey.
>
>Natasha

OK, here we go. Instead of using the Enabled property, use a call to a function in the Gotfocus event of the checkbox. That function will set the focus to another control if a specified flag or condition is not met. For example, you could tie it to the Enabled property of another control, say a textbox. So, in the Gotfocus event of the checkbox:
Private Sub check1_GotFocus()
   CheckState
End Sub
Private Sub CheckState()
   If Not myText.Enabled
      Command1.SetFocus
   End If
End Sub
HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform