Search code examples
pythonwxpythonobjectlistview

Fill the gap in every row of ObjectListView how?


Here's the problem, if you don't use check-state column in ObjectListView, there's always this gap in every row: enter image description here

Especially when you want to use a small column to show row numbers:

enter image description here

This is so NOT looking good, how do you make each row expand to the start?


Solution

  • I've just been adding an extra first empty column that has no no valueGetter and a width of 0 so it doesn't show, that way the following column starts on the left edge. Add the following as the first column.

    ObjectListView.ColumnDefn(title="", valueGetter="", maximumWidth=0)