Reputation: 89
Is it possible to merge adiacent cells in a wx.grid? I mean both horizontal as cells in a row and vertical as cells in a column.
Upvotes: 3
Views: 1557
Reputation: 33101
There is a way to make text span multiple rows or columns in a grid widget. There's an example in the wxPython demo called GridSimple.py. See lines 64-67. They read as follows:
self.SetCellValue( 9, 1, "This default cell will overflow into neighboring cells, but not if you turn overflow off.");
self.SetCellSize(11, 1, 3, 3);
self.SetCellAlignment(11, 1, wx.ALIGN_CENTRE, wx.ALIGN_CENTRE);
self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns");
Note: You don't need the semi-colons. I don't know why they're in the example.
Upvotes: 5