Dear Friends of wxPython,
i am using a PyGridTableBase class to control a wx.grid.Grid. It works and refreshes data from sql statements on a MySQL local database. The grid class has methods for SetRowLabelSize(int width), and AutoSize(). How do i call these from the PyGridTableBase Class? I put another parameter in the _init_ of this class to send in the grid object and it seems to do so as i get a print statement for the parameter as : <wx.grid.Grid; proxy of <Swig Object of type 'wxGrid *' at 0x1ed4f00> >.
How to call the grid functions/methods and events from the PyGridTableBase class ???
Also how to find the available wx.grid.gridtablemessage messages as in :
msg = wx.grid.GridTableMessage(self,
wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED,
newNumRows - curNumRows) # how many
self.GetView().ProcessTableMessage(msg)
Many thanks for your time and consideration, any assistance will be welcome. Markandeya
Dear Friends of wxPython,
i am using a PyGridTableBase class to control a wx.grid.Grid. It works and refreshes data from sql statements on a MySQL local database. The grid class has methods for SetRowLabelSize(int width), and AutoSize(). How do i call these from the PyGridTableBase Class? I put another parameter in the _init_ of this class to send in the grid object and it seems to do so as i get a print statement for the parameter as : <wx.grid.Grid; proxy of <Swig Object of type 'wxGrid *' at 0x1ed4f00> >.
How to call the grid functions/methods and events from the PyGridTableBase class ???
The table has a GetView method that will give you a reference to the grid. You can use that to call the grid methods, but in most cases you probably don't want to do that. Instead the grid is asking the table about the data, labels, attributes, etc. and you let it know what to use by overriding the appropriate methods of the table class.
Also how to find the available wx.grid.gridtablemessage messages as in :