I am currently piping information to a wxPython GUI program in real time. I would like to make a custom spread-sheet-style 4x4 cell grid that continuously displays the values for a matrix being updated and sent to the GUI. Is it possible to edit the default row and column names (from 1234 and ABCD to ACGT and ACGT for example) for a wxPython cSheet and to make the cells non-editabl开发者_如何学JAVAe?
Any suggestions or advice would be appreciated. Thank you in advance.
wx.lib.sheet.CSheet
class extends wx.grid.Grid
, there are SetColLabelValue
and SetRowLabelValue
methods:
names = 'ACGT'
sheet = CSheet(panel)
for index, name in enumerate(names):
sheet.SetColLabelValue(index, name)
sheet.SetRowLabelValue(index, name)
sizer.Add(sheet)
You can make cells non-editable by calling SetReadOnly
method on each cell.
UPD: As @VZ. has noted: EnableEditing(false)
makes your grid non-editable.
精彩评论