WXPYTHON push button call a frame

Marcpp marcpp at gmail.com
Thu Jul 5 11:02:29 CEST 2007


Hi I need to call a widget from a button in WXPYTHON. I've tried to
this from a function like this, but when push the button, the program
opens a window and do error.
Any idea?

.....
    def DialogRRHH(self,event):
        prog = wx.PySimpleApp(0)
        wx.InitAllImageHandlers()
        DialogRRHH = MTRRHH(None, -1, "")
        prog.SetTopWindow(DialogRRHH)
        DialogRRHH.Show()
        prog.MainLoop()

class MTRRHH(wx.Frame):
.......
if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    tasques = tasques(None, -1, "")
    app.SetTopWindow(tasques)
    tasques.Show()
    app.MainLoop()




More information about the Python-list mailing list