本文整理汇总了Python中wx.BOTTOM属性的典型用法代码示例。如果您正苦于以下问题:Python wx.BOTTOM属性的具体用法?Python wx.BOTTOM怎么用?Python wx.BOTTOM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.BOTTOM属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, text, title):
wx.Dialog.__init__(self, parent, -1, title,
style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
vsizer = wx.BoxSizer(wx.VERTICAL)
tc = wx.TextCtrl(self, -1, size = wx.Size(400, 200),
style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_LINEWRAP)
tc.SetValue(text)
vsizer.Add(tc, 1, wx.EXPAND);
vsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5)
okBtn = gutil.createStockButton(self, "OK")
vsizer.Add(okBtn, 0, wx.ALIGN_CENTER)
util.finishWindow(self, vsizer)
wx.EVT_BUTTON(self, okBtn.GetId(), self.OnOK)
okBtn.SetFocus()
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, id, title):
super().__init__(parent, id, title=title)
main_sizer = self.main_sizer = wx.BoxSizer(wx.VERTICAL)
self.client_or_server = wx.RadioBox(self, wx.ID_ANY, choices=(_("Client"), _("Server")), style=wx.RA_VERTICAL)
self.client_or_server.Bind(wx.EVT_RADIOBOX, self.on_client_or_server)
self.client_or_server.SetSelection(0)
main_sizer.Add(self.client_or_server)
choices = [_("Control another machine"), _("Allow this machine to be controlled")]
self.connection_type = wx.RadioBox(self, wx.ID_ANY, choices=choices, style=wx.RA_VERTICAL)
self.connection_type.SetSelection(0)
main_sizer.Add(self.connection_type)
self.container = wx.Panel(parent=self)
self.panel = ClientPanel(parent=self.container)
main_sizer.Add(self.container)
buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
main_sizer.Add(buttons, flag=wx.BOTTOM)
main_sizer.Fit(self)
self.SetSizer(main_sizer)
self.Center(wx.BOTH | WX_CENTER)
ok = wx.FindWindowById(wx.ID_OK, self)
ok.Bind(wx.EVT_BUTTON, self.on_ok)
示例3: _set_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def _set_layout(self):
main_sizer = wx.BoxSizer(wx.HORIZONTAL)
vertical_sizer = wx.BoxSizer(wx.VERTICAL)
vertical_sizer.Add(self.video_formats_label)
vertical_sizer.Add(self.video_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)
vertical_sizer.Add(self.audio_formats_label, flag=wx.TOP, border=5)
vertical_sizer.Add(self.audio_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)
vertical_sizer.Add(self.post_proc_opts_label, flag=wx.TOP, border=5)
vertical_sizer.Add(self.keep_video_checkbox, flag=wx.ALL, border=5)
vertical_sizer.Add(self.extract_audio_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
vertical_sizer.Add(self.embed_thumbnail_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
vertical_sizer.Add(self.add_metadata_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
audio_quality_sizer = wx.BoxSizer(wx.HORIZONTAL)
audio_quality_sizer.Add(self.audio_quality_label, flag=wx.ALIGN_CENTER_VERTICAL)
audio_quality_sizer.AddSpacer((20, -1))
audio_quality_sizer.Add(self.audio_quality_combobox)
vertical_sizer.Add(audio_quality_sizer, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
main_sizer.Add(vertical_sizer, 1, wx.EXPAND | wx.ALL, border=5)
self.SetSizer(main_sizer)
示例4: InitUI
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def InitUI(self):
pnl = wx.Panel(self)
vbox = wx.BoxSizer(wx.VERTICAL)
sb = wx.StaticBox(pnl, label=u'请输入员工号')
sbs = wx.StaticBoxSizer(sb, orient=wx.VERTICAL)
self.tcCheckin = wx.TextCtrl(pnl)
sbs.Add(self.tcCheckin, 0, wx.ALL|wx.EXPAND, 5)
pnl.SetSizer(sbs)
hbox2 = wx.BoxSizer(wx.HORIZONTAL)
okButton = wx.Button(self, label=u'确认')
closeButton = wx.Button(self, label=u'取消')
hbox2.Add(okButton)
hbox2.Add(closeButton, flag=wx.LEFT, border=5)
vbox.Add(pnl, 0, wx.ALL|wx.EXPAND, 5)
vbox.Add(hbox2, 0, wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM, 10)
self.SetSizer(vbox)
self.Layout()
okButton.Bind(wx.EVT_BUTTON, self.OnConfirm)
closeButton.Bind(wx.EVT_BUTTON, self.OnClose)
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, gui_size):
h = gui_size[0]
w = gui_size[1]
wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w))
## design the panel
sizer = wx.GridBagSizer(10, 7)
# Add image of DLC
icon = wx.StaticBitmap(self, bitmap=wx.Bitmap(dlc))
sizer.Add(icon, pos=(0, 0), span=(0, 8), flag=wx.EXPAND | wx.BOTTOM, border=10)
line = wx.StaticLine(self)
sizer.Add(line, pos=(1, 0), span=(1, 8), flag=wx.EXPAND | wx.BOTTOM, border=10)
# if editing this text make sure you add the '\n' to get the new line. The sizer is unable to format lines correctly.
description = "DeepLabCut™ is an open source tool for markerless\npose estimation of user-defined body parts with deep learning.\nA. and M.W. Mathis Labs | http://www.deeplabcut.org\n \nWelcome to the DeepLabCut Project Manager GUI!\nTo get started, please click on the 'Manage Project'\n tab to create or load an existing project. \n "
self.proj_name = wx.StaticText(self, label=description, style=wx.ALIGN_CENTRE)
sizer.Add(self.proj_name, pos=(2, 3), border=10)
sizer.AddGrowableCol(2)
self.SetSizer(sizer)
sizer.Fit(self)
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, name, parent, index, label):
# Initialise parent classes
ManagedBase.__init__(self, name, parent, index)
EditStylesMixin.__init__(self)
BitmapMixin.__init__(self)
# initialise instance properties
self.label = np.TextProperty(label, default_value="", multiline="grow")
self.default = np.CheckBoxProperty(False, default_value=False)
self.stockitem = np.ListBoxPropertyD(self.STOCKITEMS[0], choices=self.STOCKITEMS)
self.bitmap = np.BitmapPropertyD(min_version=(3,0))
self.disabled_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.pressed_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.current_bitmap = np.BitmapPropertyD(min_version=(3,0))
self.focus_bitmap = np.BitmapPropertyD(min_version=(3,0))
values = [wx.LEFT, wx.RIGHT, wx.TOP, wx.BOTTOM]
aliases = ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
p = self.bitmap_dir = np.RadioProperty(wx.LEFT, values, columns=4, aliases=aliases, default_value=wx.LEFT)
p.min_version = (3,0)
p.blocked = True
示例7: Configure
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def Configure(self, imageFileName='', style=1):
panel = eg.ConfigPanel()
text = self.text
filepathCtrl = eg.FileBrowseButton(
panel,
size = (340, -1),
initialValue = imageFileName,
labelText = "",
fileMask = text.fileMask,
buttonText = eg.text.General.browse,
)
choice = wx.Choice(panel, -1, choices=text.choices)
choice.SetSelection(style)
sizer = panel.sizer
sizer.Add(panel.StaticText(text.text1), 0, wx.EXPAND)
sizer.Add(filepathCtrl, 0, wx.EXPAND)
sizer.Add(panel.StaticText(text.text2), 0, wx.EXPAND | wx.TOP, 10)
sizer.Add(choice, 0, wx.BOTTOM, 10)
while panel.Affirmed():
panel.SetResult(filepathCtrl.GetValue(), choice.GetSelection())
示例8: Configure
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def Configure(self, cmdLineArgs=""):
vlcPath = GetVlcPath()
panel = eg.ConfigPanel()
cmdLineCtrl = panel.TextCtrl(cmdLineArgs)
resultCtrl = eg.StaticTextBox(panel)
def OnTextChange(event=None):
cmdLineArgs = cmdLineCtrl.GetValue()
cmdString = '"%s" %s' % (vlcPath, self.GetCmdLineArgs(cmdLineArgs))
resultCtrl.SetValue(cmdString)
if event:
event.Skip()
OnTextChange()
cmdLineCtrl.Bind(wx.EVT_TEXT, OnTextChange)
panel.sizer.AddMany([
(panel.StaticText(self.text.additionalArgs), 0, wx.BOTTOM, 3),
(cmdLineCtrl, 0, wx.EXPAND|wx.BOTTOM, 5),
((15, 15), ),
(panel.StaticText(self.text.resultingCmdLine), 0, wx.BOTTOM, 3),
(resultCtrl, 1, wx.EXPAND),
])
while panel.Affirmed():
panel.SetResult(cmdLineCtrl.GetValue())
示例9: _create_EthercatNodeEditor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def _create_EthercatNodeEditor(self, prnt):
self.EthercatNodeEditor = wx.Panel(prnt, style=wx.TAB_TRAVERSAL)
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5)
main_sizer.AddGrowableCol(0)
main_sizer.AddGrowableRow(1)
variables_label = wx.StaticText(self.EthercatNodeEditor,
label=_('Variable entries:'))
main_sizer.AddWindow(variables_label, border=10, flag=wx.TOP | wx.LEFT | wx.RIGHT)
self.NodeVariables = NodeVariablesSizer(self.EthercatNodeEditor, self.Controler)
main_sizer.AddSizer(self.NodeVariables, border=10,
flag=wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.EthercatNodeEditor.SetSizer(main_sizer)
return self.EthercatNodeEditor
示例10: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, enable_required=True):
wx.Dialog.__init__(self, parent, title=_('Project properties'),
style=wx.DEFAULT_DIALOG_STYLE)
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
main_sizer.AddGrowableCol(0)
main_sizer.AddGrowableRow(0)
self.ProjectProperties = ProjectPropertiesPanel(
self, enable_required=enable_required, scrolling=False)
main_sizer.AddWindow(self.ProjectProperties, flag=wx.GROW)
self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK,
self.ButtonSizer.GetAffirmativeButton())
main_sizer.AddSizer(self.ButtonSizer, border=20,
flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
self.ProjectProperties.Fit()
self.Fit()
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, info):
wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400),
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
if parent and parent.GetIcon():
self.SetIcon(parent.GetIcon())
self.SetMinSize((400, 300))
close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))
ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
ctrl.SetValue(info.License)
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.Add(close)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10)
sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
self.SetSizer(sizer)
self.Layout()
self.Show()
self.SetEscapeId(close.GetId())
close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
示例12: AddSizerParams
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def AddSizerParams(self, parent, sizer, params):
for idx, (name, label) in enumerate(params):
border = 0
if idx == 0:
border |= wx.TOP
elif idx == len(params) - 1:
border |= wx.BOTTOM
st = wx.StaticText(parent, label=label)
sizer.AddWindow(st, border=10,
flag=wx.ALIGN_CENTER_VERTICAL | border | wx.LEFT)
tc = wx.TextCtrl(parent, style=wx.TE_PROCESS_ENTER)
setattr(self, name, tc)
callback = self.GetTextCtrlChangedFunction(tc, name)
self.Bind(wx.EVT_TEXT_ENTER, callback, tc)
tc.Bind(wx.EVT_KILL_FOCUS, callback)
sizer.AddWindow(tc, border=10,
flag=wx.GROW | border | wx.RIGHT)
示例13: _do_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def _do_layout(self):
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.AddSpacer(10)
sizer.Add(self.text, 0, wx.LEFT, 30)
sizer.AddSpacer(10)
sizer.Add(self.cmd_textbox, 1, wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, 30)
sizer.AddSpacer(20)
self.SetSizer(sizer)
示例14: addSpin
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def addSpin(self, name, descr, parent, sizer, cfgName):
hsizer = wx.BoxSizer(wx.HORIZONTAL)
hsizer.Add(wx.StaticText(parent, -1, descr), 0,
wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
tmp = wx.SpinCtrl(parent, -1)
tmp.SetRange(*self.cfg.cvars.getMinMax(cfgName))
wx.EVT_SPINCTRL(self, tmp.GetId(), self.OnMisc)
wx.EVT_KILL_FOCUS(tmp, self.OnKillFocus)
hsizer.Add(tmp)
sizer.Add(hsizer, 0, wx.BOTTOM, 10)
setattr(self, name + "Entry", tmp)
示例15: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import BOTTOM [as 别名]
def __init__(self, parent, id, cfg):
wx.Panel.__init__(self, parent, id)
self.cfg = cfg
vsizer = wx.BoxSizer(wx.VERTICAL)
hsizer = wx.BoxSizer(wx.HORIZONTAL)
hsizer.Add(wx.StaticText(self, -1, "Element:"), 0,
wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
self.elementsCombo = wx.ComboBox(self, -1, style = wx.CB_READONLY)
for t in config.getTIs():
self.elementsCombo.Append(t.name, t.lt)
hsizer.Add(self.elementsCombo, 0)
vsizer.Add(hsizer, 0, wx.EXPAND)
vsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 10)
gsizer = wx.FlexGridSizer(0, 2, 5, 0)
self.addTypeCombo("newEnter", "Enter creates", self, gsizer)
self.addTypeCombo("newTab", "Tab creates", self, gsizer)
self.addTypeCombo("nextTab", "Tab switches to", self, gsizer)
self.addTypeCombo("prevTab", "Shift+Tab switches to", self, gsizer)
vsizer.Add(gsizer)
util.finishWindow(self, vsizer, center = False)
wx.EVT_COMBOBOX(self, self.elementsCombo.GetId(), self.OnElementCombo)
self.elementsCombo.SetSelection(0)
self.OnElementCombo()