Does anyone know how to disable the focus rectangle that appears around the text of a checkbox when TABing into it?
Printable View
Does anyone know how to disable the focus rectangle that appears around the text of a checkbox when TABing into it?
Does not appear to be a way - BUT, you can cheat! You can just set the text of the checkbox to nothing and then put a separate Lable control right next to it.
Yeh... and most probably i'll do that, since this checkbox is itself inside my usercontrol...
BUT - i know there is a read-only UICuesEventArgs property called ShowFocus that is accsisable when the ChangedUICues event of the combobox is fired. This event is fired only at the first time i use the TAB in the form (even not if prior to that i have clicked on the combobox!). so as long as it was not fired, the rectangle doesn't show. after it was fired, the rectangle shows. So i'm sure there is some function/method call to change this property. (it was so easy in VB6!)
I got a great suggestion from a mr jacob grass, to create my own checkbox:Quote:
Originally posted by Slow_Learner
Does not appear to be a way - BUT, you can cheat! You can just set the text of the checkbox to nothing and then put a separate Lable control right next to it.
Public Sub MyCheckBox
Inherits CheckBox
Public Sub New()
MyBase.New()
ShowFocusCues = False
End Sub
End Class
ShowFocusCues is a Protected Property of Control and only accessible in the class itself or derived classes.
Uri
Neat, thanks!