本文整理匯總了Python中wx.FIXED_MINSIZE屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.FIXED_MINSIZE屬性的具體用法?Python wx.FIXED_MINSIZE怎麽用?Python wx.FIXED_MINSIZE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類wx
的用法示例。
在下文中一共展示了wx.FIXED_MINSIZE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: add_value
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FIXED_MINSIZE [as 別名]
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
示例2: __do_layout
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FIXED_MINSIZE [as 別名]
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)
示例3: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FIXED_MINSIZE [as 別名]
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)