SetValue method in GridTableBase wxPython

All other Source.Python topics and issues.
User avatar
pikkip
Junior Member
Posts: 7
Joined: Mon Oct 17, 2016 11:38 am

SetValue method in GridTableBase wxPython

Postby pikkip » Mon Oct 24, 2016 11:05 am

Can anyone tell me how to redefine the method 'SetValue()' of wx.PyGridTableBase ??? :confused:
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: SetValue method in GridTableBase wxPython

Postby Ayuto » Mon Oct 24, 2016 4:57 pm

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.
User avatar
pikkip
Junior Member
Posts: 7
Joined: Mon Oct 17, 2016 11:38 am

Re: SetValue method in GridTableBase wxPython

Postby pikkip » Tue Oct 25, 2016 6:48 am

Thank you

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 33 guests