How can the size of the row label in a grid change automatically?

Hi all,

I face a problem in using grid for some purpose. To set the label size of grid element, a setter method SetRowLabelSize(width) recommends “If width equals wxGRID_AUTOSIZE then width is calculated automatically so that no label is truncated. Note that this could be slow for a large table. This flag is new since wxWidgets version 2.8.8.” I am using wxPython 2.8.9.1 and and i tried to include wx.GRID_AUTOSIZE, but i got error. Can any one help me how to fix this? I have tried to use the AutoSize() method however, the AutoSize() command did change the column label size automatically but did not change the row label size. How can the size of the row lable change automatically so that no label is truncated?

with regards,

Michael

w. Michael wrote:

Hi all,
I face a problem in using grid for some purpose. To set the label size of grid element, a setter method SetRowLabelSize(width) recommends "If width equals wxGRID_AUTOSIZE then width is calculated automatically so that no label is truncated. Note that this could be slow for a large table. This flag is new since wxWidgets version 2.8.8." I am using wxPython 2.8.9.1 and and i tried to include wx.GRID_AUTOSIZE, but i got error.

Try wx.grid.GRID_AUTOSIZE.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

1 Like