欢迎光临散文网 会员登陆 & 注册

放弃tkinter转投wxpython

2020-03-13 15:49 作者:一心想当网红的李老师  | 我要投稿

实在是因为搞不定tkinter和opencv的交互。同时资料不太多。

所以改投wxpython门下吧。去个大社区,帮助多多的。

import wx



class Frame(wx.Frame):

    def _init_(self):

        wx.Frame._init_(self,None,-1,"open",size=(100,100))

        panel=wx.Panel(self,-1)

        self.button=wx.Button(panel,-1,"open",pos=(20,20))

        self.Bind(wx.EVT_BUTTON,self.ONclick,self.button)

        self.button.SetDefault()

        

    def OnClick(self,event):

        self.Button.SetLabel("click")

        

if __name__=='_main_':

    app=wx.PySimpleApp()

    frame=Frame

    frame.Show()

    app.MainLoop()


运行了程序,不报错,不显示????


放弃tkinter转投wxpython的评论 (共 条)

分享到微博请遵守国家法律