Add action to button : Button : WxPython PYTHON TUTORIALS


PYTHON TUTORIALS » WxPython » Button »

 

Add action to button


Add action to button
import wx

def hello(event):
    print "Hello, world!"

app = wx.App()

win = wx.Frame(None, title="Hello",size=(200100))
button = wx.Button(win, label="Hello")
button.Bind(wx.EVT_BUTTON, hello)

win.Show()
app.MainLoop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo WxPython
» Button