Python wx.FIXED_MINSIZE Examples
The following are 4
code examples of wx.FIXED_MINSIZE().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: __init__.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def add_value(self, value, dotify=False): t = ElectroStaticText(self.parent_widget, id=wx.ID_ANY, label="", dotify=dotify) self.Add(t, flag=wx.FIXED_MINSIZE|wx.GROW) t.SetLabel(value) return t
Example #2
Source File: panels.py From topoflow with MIT License | 5 votes |
def __do_layout(self): self.grid_sizer = wx.GridSizer(5, 5, 4, 4) self.grid_sizer.Add(self.label, 0, wx.FIXED_MINSIZE, 0) self.grid_sizer.Add(self.switch_panel, 0, wx.FIXED_MINSIZE, 0) self.SetAutoLayout(True) self.SetSizer(self.grid_sizer) self.grid_sizer.Fit(self) self.grid_sizer.SetSizeHints(self)
Example #3
Source File: panels.py From topoflow with MIT License | 5 votes |
def __do_layout(self): self.grid_sizer = wx.GridSizer(5, 5, 4, 4) self.grid_sizer.Add(self.label, 0, wx.FIXED_MINSIZE, 0) self.grid_sizer.Add(self.switch_panel, 0, wx.FIXED_MINSIZE, 0) self.SetAutoLayout(True) self.SetSizer(self.grid_sizer) self.grid_sizer.Fit(self) self.grid_sizer.SetSizeHints(self)
Example #4
Source File: frame_connect.py From bookhub with MIT License | 5 votes |
def __init__(self, db, parent=None): wx.Dialog.__init__(self, parent=parent, id=-1) self.db = db # db handler. connect() method is required self.SetTitle("Connect Mongo") # widgets labelHost, self.inputHost = LabelText('Host: ', 'localhost', self) labelPort, self.inputPort = LabelText('Port: ', '27017', self) btnConn = wx.Button(self, label='Connect') btnCancel = wx.Button(self, id=wx.ID_CANCEL, label="Cancel") # event handler self.Bind(wx.EVT_BUTTON, self.OnConnect, btnConn) # connet if user press enter self.Bind(wx.EVT_TEXT_ENTER, self.OnConnect, self.inputHost) self.Bind(wx.EVT_TEXT_ENTER, self.OnConnect, self.inputPort) # default settings self.inputHost.SetFocus() # Layout-inputs gridInputs = wx.FlexGridSizer(2, 2, 10, 10) gridInputs.SetFlexibleDirection = wx.HORIZONTAL gridInputs.AddMany([(labelHost), (self.inputHost, 0, wx.EXPAND), (labelPort), (self.inputPort, 0, wx.EXPAND), ]) # Layout-action button sizer_act = wx.BoxSizer(wx.HORIZONTAL) sizer_act.Add(btnConn, 1, wx.ALIGN_CENTER | wx.FIXED_MINSIZE, 10) sizer_act.Add(btnCancel, 1, wx.ALIGN_CENTER | wx.FIXED_MINSIZE, 10) # main sizer sizer_main = wx.BoxSizer(wx.VERTICAL) sizer_main.Add(gridInputs, 2, flag=wx.ALL | wx.EXPAND, border=10) sizer_main.Add(sizer_act, 1, wx.ALIGN_CENTER | wx.FIXED_MINSIZE, 10) self.SetSizer(sizer_main) self.SetAutoLayout(1) sizer_main.Fit(self)