Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Prevent focus rects entirely
posted

Good day,

Is there a "global" way of preventing focus rectangles from being drawn on combo box controls (or all controls in general, for that matter)?

It's easy enough to create a general-purpose draw filter, but it's a bit cumbersome to attach it to every control instance.

Please let me know if there's a more general approach to solving this problem.

Best regards,

Mark R.

Parents
No Data
Reply
  • 12480
    Offline posted

    Hi Mark,

    I am not aware of a way to globally disable the focus rect. This is easy for Infragistics button controls, since they have a ShowFocusRect property. For other controls, the best way is either a DrawFilter (as you suggested) or to derive a new control and override the ShowFocusCues property. ShowFocusCues determines whether the focus rect is drawn and it's on the Control class, but it's protected so it's normally inaccessible.

    Please let me know if you have any questions.

Children
No Data