How do I mention Screen Get size (350,450) in the context of the percent
# - * - coding: utf-8 - * - # gotoclass.py import wx class instance (wx.Frame): def __init __ (self, parent, title): Super (for example, self) .__ init __ (parent, title = title, size = (390, 350)) self.InitUI () self.Centre () self.Show () def InitUI (self): panel = wx.Panel (self) font = wx.SystemSettings_GetFont (wx.SYS_SYSTEM_FONT) font.SetPointSize (9) vbox = wx.BoxSizer (wx.VERTICAL) hbox1 = wx.BoxSizer (wx.HORIZONTAL) st1 = wx.StaticText ( Panel, label = 'square Program ') st1.SetFont (Font) hbox1.Add (Stl, flag = wx.RIGHT, border = 8) TC = wx.TextCtrl (panel) hbox1.Add (TC, ratio = 1) vbox.Add (hbox1, flag = wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, range = 10) vbox.Add ((- 1, 10)) panel.SetSizer (vbox) If __name__ == '__main__': app = wx. App () example (none, title = 'go to to class') app The main loop ()
wx.GetDisplaySize () later, set by
self.SetSize () , not in the manufacturer, but before
self.Show () / P>
Wednesday 15 January 2014
python - How to mention height and Width in terms of percentage in size() in wxpython -
code>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment