The problem is that when the checkbox receives focus, it only selects the text part of the control, which is empty in your case. You have several options:
1) For all your βemptyβ text fields, set the text property to a space. This will create a small selection when you go to the control.
2) Program the OnEnter and OnLeave events of this flag and draw / color a square around the entire control.
3) If you want the default behavior of MouseEnter to create a yellow highlight in the checkbox itself, create your own checkbox element as follows:
public class MyCB : CheckBox { protected override void OnEnter(EventArgs e) { base.OnEnter(e); base.OnMouseEnter(e); } protected override void OnLeave(EventArgs e) { base.OnLeave(e); base.OnMouseLeave(e); } }
Akoran
source share