Search code examples
python-2.7wxpython

How do I add a separator in a grid in wxPython?


I've been trying to add separator lines between rows in my grid. I tried using wx.Menu() with the AppendSeparator() method, however the wx grid can't add objects of type Menu. Is there any other way?


Solution

  • This is not supported by the grid widget. You could size a column or row such that it is skinnier than usual and change all the cells in that row or column to have a different background color. You might also be able to utilize a custom label renderer or cell renderer. See the wxPython demo for examples.