Home Forums WinForms controls Xceed Grid for WinForms PaintFocusRectangle even when grid loses focus

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17412 |

    I am overriding PaintFocusRectangle to draw my own rectangle border around the selected cell.

    But when the user selects a control outside the grid, the cell loses focus and my rectangle border disappears.

    Can anyone think of a way to keep this rectangle?  The user needs to see the selected cell even when they click elsewhere.

    Imported from legacy forums. Posted by Buzz (had 758 views)

    Xceed Support
    Member
    Post count: 5658

     

    Hi Buzz,

    Overriding PaintFocusRectangle will only draw the rectangle when the GridControl is on focus. It is normal that the rectangle disappears when the grid control loses the focus.

    To keep the rectangle, you could override the PaintBackground method on the Cell class.
     

    Imported from legacy forums. Posted by Mohamed [Xceed] (had 890 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.