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
1070
Focus Rectangle around active Row
posted

Hi there,

is there a way to draw the Focus Rectangle around active Row also when the Grid is not focused?

Thanks a lot for any help!

Parents
No Data
Reply
  • 469350
    Offline posted

    The focus rectangle is intended to display which control on a form has focus. So if you draw the focus rectangle when the control does not have focus, then there could potentially be 2 focus rectangles displayed at the same time. That seems like a very odd UI choice and probably violates some Windows standards and it could be pretty confusing to your users. Why would you want to do this?

    To answer your question, yes, I'm pretty sure it's possible to achieve this, but you would have to use a DrawFilter to draw the focus rect yourself. I don't think this would be too difficult. You would have to determine what UIElement currently draws the focus rect and then trap for when the grid does not have focus and then draw it. You would also have to try to determine how the grid calculates the rect in which to draw the focus rectangle, but that should be possible with a little bit of trial-and-error.

Children