1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | import wx class Example(wx.Frame): def __init__( self , parent, title): super (Example, self ).__init__(parent, title = title, size = ( 260 , 180 )) self .InitUI() self .Centre() self .Show() def InitUI( self ): menubar = wx.MenuBar() filem = wx.Menu() editm = wx.Menu() helpm = wx.Menu() menubar.Append(filem, '&File' ) menubar.Append(editm, '&Edit' ) menubar.Append(helpm, '&Help' ) self .SetMenuBar(menubar) #wx.TextCtrl(panel, pos=(3, 3), size=(250, 150)) wx.TextCtrl( self ) #auto reize if __name__ = = '__main__' : app = wx.App() Example( None , title = 'Absolute Positioning' ) app.MainLoop() |
article
Sunday, May 27, 2018
wxpython layout Absolute Positioning
wxpython layout Absolute Positioning