Search code examples
pythonwxpython

wx.lib.sheet column and row names


Is it possible to somehow change column and row names in wx.lib.sheet widget? From A, B, C, D to Name, Surname, Age, DOB for example.

If not is there any similar way to make Sheetlike data input GUI?


Solution

  • As far as wx.lib.sheet.CSheet class extends wx.grid.Grid, there's SetColLabelValue method:

    column_names = ['Name', 'Surname', 'Age', 'DOB']
    sheet = CSheet(panel)
    for index, name in enumerate(column_names):
        sheet.SetColLabelValue(index, name)
    sizer.Add(sheet)
    

    SetRowLabelValue is for rows.