Search code examples
pythonwxpythonlistctrl

Is there a way to only highlight a cell instead of the whole row when it's clicked with wx.ListCtrl?


I noticed wx.ListCtrl would always highlight a whole row wherever it's clicked by default, is there a way to make it only highlight the selected cell?


Solution

  • No, I think that's built-in. You would have to catch the selection event and probably make all the cells editable so you could select just the cell. Otherwise I would look at UltimateListCtrl as that is a custom widget and you can probably subclass it in such a way as to add that functionality.

    Or don't use a ListCtrl at all and switch to using a wx.Grid