Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read only check box
Message
De
05/09/2001 16:27:54
 
 
À
05/09/2001 15:43:18
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00552763
Message ID:
00552798
Vues:
12
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform