Hello,
(in wxPython)
I want to redirect the SetStatusText
to an own method (change the text somewhat) and
then call the SetStatusText of wx.Frame.
But I have a little problem of understanding, but I think,
it should be achieved somehow.
the output of "show_statu s" should be then:
"mytext: hallo"
class MyFrame (wx.Frame):
def show_status(sel f):
SetStatusText ("hallo")
my_frame = Myframe
Plugin (my_frame)
def Plugin(frame_in st)
#here i want to redirect the setstatustext
setattr(frame_i nst, 'SetStatusText' , NewStatusText)
def SetStatusText(t e,text,nr=0):
super(MyFrame, MyFrame).SetSta tusText("mytext : " + te)
#this is erronous
def NewStatusText(s , n, n1= 0):
SetStatusText(s , n, n1)
Is this possible?
How can I get this working?
thank you in advance
--
Franz Steinhaeusler
(in wxPython)
I want to redirect the SetStatusText
to an own method (change the text somewhat) and
then call the SetStatusText of wx.Frame.
But I have a little problem of understanding, but I think,
it should be achieved somehow.
the output of "show_statu s" should be then:
"mytext: hallo"
class MyFrame (wx.Frame):
def show_status(sel f):
SetStatusText ("hallo")
my_frame = Myframe
Plugin (my_frame)
def Plugin(frame_in st)
#here i want to redirect the setstatustext
setattr(frame_i nst, 'SetStatusText' , NewStatusText)
def SetStatusText(t e,text,nr=0):
super(MyFrame, MyFrame).SetSta tusText("mytext : " + te)
#this is erronous
def NewStatusText(s , n, n1= 0):
SetStatusText(s , n, n1)
Is this possible?
How can I get this working?
thank you in advance
--
Franz Steinhaeusler
Comment