Hi All,
Is there a way to change the height of the header row on a wx.Grid control? I’m digging through the docs but I’m coming up empty.
Hi All,
Is there a way to change the height of the header row on a wx.Grid control? I’m digging through the docs but I’m coming up empty.
Check SetColLabelSize / SetRowLabelSize
Unfortunately, I think, there’s no way to resize with the mouse.
So in my event handlers I check whether the user is holding Ctrl or Shift when resizing a row/col.
E.g.:
self.Bind(grid.EVT_GRID_ROW_SIZE, self.OnGridRowSize)
self.Bind(grid.EVT_GRID_COL_SIZE, self.OnGridColSize)
def OnGridRowSize(self, event):
row = event.GetRowOrCol()
if row>=self.table().GetNumberRows():
event.Skip()
return
size = self.GetRowSize(row)
if event.ControlDown() or event.ShiftDown():
self.SetColLabelSize(size)
size = self.GetDefaultRowSize()
self.SetDefaultRowSize(size, 1)
self.ForceRefresh()
Perfect! Not sure how I overlooked it (probably not enough sleep and too many interruptions today ).