Page 1 of 1

SetValue method in GridTableBase wxPython

Posted: Mon Oct 24, 2016 11:05 am
by pikkip
Can anyone tell me how to redefine the method 'SetValue()' of wx.PyGridTableBase ??? :confused:

Re: SetValue method in GridTableBase wxPython

Posted: Mon Oct 24, 2016 4:57 pm
by Ayuto
You can either override the method by subclassing wx.PyGridTableBase or monkey patch by using something like this:

Syntax: Select all

def your_new_method(self, *args, **kwargs):
pass

wx.PyGridTableBase.SetValue = your_new_method
Though, subclassing is the preferred way to achieve that.

Re: SetValue method in GridTableBase wxPython

Posted: Tue Oct 25, 2016 6:48 am
by pikkip
Thank you