Adding a Button to a Frame : Button « wxPython « Python Tutorial






Adding a Button to a Frame
import wx

app = wx.App()
win = wx.Frame(None)
btn = wx.Button(win)
win.Show()
app.MainLoop()








19.2.Button
19.2.1.Adding a Button to a FrameAdding a Button to a Frame
19.2.2.Setting Button PositionsSetting Button Positions
19.2.3.Add action to buttonAdd action to button
19.2.4.Set label in button actionSet label in button action
19.2.5.Bind event to button (Mouse enter and leave, button clicked)Bind event to button (Mouse enter and leave, button clicked)