本文整理汇总了Python中wx.StaticLine方法的典型用法代码示例。如果您正苦于以下问题:Python wx.StaticLine方法的具体用法?Python wx.StaticLine怎么用?Python wx.StaticLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.StaticLine方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [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 StaticLine [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)
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def __init__(self, *args, **kwds):
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.label_2_copy = wx.StaticText(self, -1, _("Family:"))
self.label_3_copy = wx.StaticText(self, -1, _("Style:"))
self.label_4_copy = wx.StaticText(self, -1, _("Weight:"))
self.family = wx.Choice(self, -1, choices=["Default", "Decorative", "Roman", "Script", "Swiss", "Modern"])
self.style = wx.Choice(self, -1, choices=["Normal", "Slant", "Italic"])
self.weight = wx.Choice(self, -1, choices=["Normal", "Light", "Bold"])
self.label_1 = wx.StaticText(self, -1, _("Size in points:"))
self.point_size = wx.SpinCtrl(self, -1, "", min=0, max=100)
self.underline = wx.CheckBox(self, -1, _("Underlined"))
self.font_btn = wx.Button(self, -1, _("Specific font..."))
self.static_line_1 = wx.StaticLine(self, -1)
self.ok_btn = wx.Button(self, wx.ID_OK, _("OK"))
self.cancel_btn = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
self.__set_properties()
self.__do_layout()
self.value = None
self.font_btn.Bind(wx.EVT_BUTTON, self.choose_specific_font)
self.ok_btn.Bind(wx.EVT_BUTTON, self.on_ok)
示例4: __do_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def __do_layout(self):
# begin wxGlade: Frame192.__do_layout
self.sizer_as_attr = wx.FlexGridSizer(3, 1, 0, 0)
sizer_local = wx.BoxSizer(wx.HORIZONTAL)
label_1 = wx.StaticText(self, wx.ID_ANY, _("Just a text"), style=wx.ALIGN_CENTER)
self.sizer_as_attr.Add(label_1, 1, wx.ALIGN_CENTER | wx.ALL | wx.EXPAND | wx.SHAPED, 5)
static_line_1 = wx.StaticLine(self, wx.ID_ANY)
self.sizer_as_attr.Add(static_line_1, 0, wx.ALL | wx.EXPAND, 5)
sizer_local.Add(self.button_2, 0, 0, 0)
sizer_local.Add(self.button_1, 0, 0, 0)
self.sizer_as_attr.Add(sizer_local, 1, wx.ALIGN_RIGHT | wx.ALL, 5)
self.SetSizer(self.sizer_as_attr)
self.sizer_as_attr.SetSizeHints(self)
self.sizer_as_attr.AddGrowableRow(0)
self.sizer_as_attr.AddGrowableCol(0)
self.Layout()
# end wxGlade
# end of class Frame192
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: UIBugDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
wx.Dialog.__init__(self, *args, **kwds)
self.SetSize((600, 400))
self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=wx.NB_BOTTOM)
self.nb1_pane_summary = wx.Panel(self.notebook_1, wx.ID_ANY)
self.st_header = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("An internal error occurred while %(action)s"))
self.st_summary = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("Error type: %(exc_type)s\nError summary: %(exc_msg)s"))
self.st_report = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("This is a bug - please report it."))
self.nb1_pane_details = wx.Panel(self.notebook_1, wx.ID_ANY)
self.st_details = wx.StaticText(self.nb1_pane_details, wx.ID_ANY, _("Error details:"))
self.tc_details = wx.TextCtrl(self.nb1_pane_details, wx.ID_ANY, "", style=wx.TE_MULTILINE)
self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
self.tc_howto_report = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, _("Writing a helpful bug report is easy if you follow some hints. The items below should help you to integrate useful information. They are not an absolute rule - it's more like a guideline.\n\n- What did you do? Maybe you want to include a screenshot.\n- What did you want to happen?\n- What did actually happen?\n- Provide a short example to reproduce the issue.\n- Include the internal error log file %(log_file)s if required.\n\nPlease open a new bug in the wxGlade bug tracker https://github.com/wxGlade/wxGlade/issues/ .\nAlternatively you can send the bug report to the wxGlade mailing list wxglade-general@lists.sourceforge.net. Keep in mind that you need a subscription for sending emails to this mailing list.\nThe subscription page is at https://sourceforge.net/projects/wxglade/lists/wxglade-general ."), style=wx.TE_MULTILINE | wx.TE_READONLY)
self.static_line_1 = wx.StaticLine(self, wx.ID_ANY)
self.btn_copy = wx.Button(self, wx.ID_COPY, "")
self.btn_ok = wx.Button(self, wx.ID_OK, "")
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.OnCopy, self.btn_copy)
# end wxGlade
示例6: FinishSetup
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def FinishSetup(self):
# Temporary hack to fix button tabulator ordering problems.
self.panel.FinishSetup()
if self.description:
self.CreateHelpPanel()
#line = wx.StaticLine(self)
#self.mainSizer.Add(line, 0, wx.EXPAND|wx.ALIGN_CENTER)
buttonRow = self.buttonRow
buttonRow.applyButton.MoveAfterInTabOrder(self.notebook)
buttonRow.cancelButton.MoveAfterInTabOrder(self.notebook)
buttonRow.okButton.MoveAfterInTabOrder(self.notebook)
if buttonRow.testButton:
buttonRow.testButton.MoveAfterInTabOrder(self.notebook)
# if not self.showLine:
# line.Hide()
if self.resizable:
self.mainSizer.Add(self.buttonRow.sizer, 0, wx.EXPAND, 0)
else:
self.mainSizer.Add(self.buttonRow.sizer, 0, wx.EXPAND | wx.RIGHT, 10)
self.SetSizerAndFit(self.mainSizer)
self.Fit() # without the addition Fit(), some dialogs get a bad size
self.SetMinSize(self.GetSize())
self.CentreOnParent()
self.panel.SetFocus()
eg.TaskletDialog.FinishSetup(self)
示例7: Configure
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def Configure(self, prompt=None, initialValue=""):
if prompt is None:
prompt = PROMPT
eg.TaskletDialog.__init__(
self, None, -1, PROMPT, style=wx.RESIZE_BORDER | wx.CAPTION
)
textCtrl = self.TextCtrl(initialValue, size=(300, -1))
buttonRow = eg.ButtonRow(self, [wx.ID_OK])
mainSizer = eg.VBoxSizer(
(self.StaticText(prompt), 0, wx.EXPAND | wx.ALL, 5),
(textCtrl, 0, wx.EXPAND | wx.ALL, 5),
((5, 5), 1, wx.EXPAND),
(wx.StaticLine(self), 0, wx.EXPAND),
(buttonRow.sizer, 0, wx.EXPAND),
)
self.SetSizerAndFit(mainSizer)
self.SetMinSize(self.GetSize())
while self.Affirmed():
self.SetResult(textCtrl.GetValue())
示例8: _rule
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def _rule(parent, direction):
line = wx.StaticLine(parent, -1, style=direction)
line.SetSize((10, 10))
return line
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [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()
示例10: create_bottom_butts
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def create_bottom_butts(self):
"""Create sizer for bottom row buttons."""
self.sizer_buttons = wx.BoxSizer(wx.HORIZONTAL)
self.button_align_test = wx.Button(self, label="Align test")
self.button_test_pick = wx.Button(self, label="Pick image")
self.button_test_imag = wx.Button(self, label="Test image")
self.button_ok = wx.Button(self, label="OK")
self.button_cancel = wx.Button(self, label="Close")
self.button_align_test.Bind(wx.EVT_BUTTON, self.onAlignTest)
self.button_test_pick.Bind(wx.EVT_BUTTON, self.onChooseTestImage)
self.button_test_imag.Bind(wx.EVT_BUTTON, self.onTestWallpaper)
self.button_ok.Bind(wx.EVT_BUTTON, self.onOk)
self.button_cancel.Bind(wx.EVT_BUTTON, self.onCancel)
self.sizer_buttons.Add(self.button_align_test, 0, wx.CENTER|wx.ALL, 5)
sline = wx.StaticLine(self, -1, style=wx.LI_VERTICAL)
self.sizer_buttons.Add(sline, 0, wx.EXPAND|wx.ALL, 5)
self.tc_testimage = wx.TextCtrl(self, -1, size=(self.tc_width, -1))
self.sizer_buttons.Add(self.tc_testimage, 0, wx.CENTER|wx.ALL, 5)
self.sizer_buttons.Add(self.button_test_pick, 0, wx.CENTER|wx.ALL, 5)
self.sizer_buttons.Add(self.button_test_imag, 0, wx.CENTER|wx.ALL, 5)
self.sizer_buttons.AddStretchSpacer()
self.sizer_buttons.Add(self.button_ok, 0, wx.CENTER|wx.ALL, 5)
self.sizer_buttons.Add(self.button_cancel, 0, wx.CENTER|wx.ALL, 5)
示例11: _draw_horizontal_line
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def _draw_horizontal_line(self, sizer):
line = wx.StaticLine(self, -1, style=wx.LI_HORIZONTAL)
line.SetSize((10, 10))
sizer.Add(line, 0, wx.EXPAND)
示例12: HorizontalRule
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def HorizontalRule(parent):
line = wx.StaticLine(parent, -1, style=wx.LI_HORIZONTAL)
line.SetSize((10, 10))
return line
示例13: _rule
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def _rule(parent, direction):
line = wx.StaticLine(parent, -1, style=direction)
line.SetSize((10, 10))
return line
示例14: __do_layout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def __do_layout(self):
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
sizer_2 = wx.BoxSizer(wx.VERTICAL)
sizer_2.Add(self.use_null_color, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
sizer_2.Add(wx.StaticLine(self.panel_1, -1), 0, wx.ALL|wx.EXPAND, 5)
sizer_2.Add(self.use_sys_color, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
sizer_2.Add(self.sys_color, 0, wx.ALL|wx.EXPAND, 5)
sizer_2.Add(self.sys_color_panel, 0, wx.ALL|wx.EXPAND, 5)
sizer_2.Add(wx.StaticLine(self.panel_1, -1), 0, wx.ALL|wx.EXPAND, 5)
sizer_2.Add(self.use_chooser, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 5)
self.panel_1.SetAutoLayout(1)
self.panel_1.SetSizer(sizer_2)
sizer_2.Fit(self.panel_1)
sizer_2.SetSizeHints(self.panel_1)
sizer_1.Add(self.panel_1, 0, wx.EXPAND, 0)
sizer_1.Add(self.color_chooser, 0, wx.ALL, 5)
sizer_2.Add(wx.StaticLine(self.panel_1, -1), 0, wx.ALL|wx.EXPAND, 5)
sizer_3.Add(self.ok, 0, wx.RIGHT, 13)
sizer_3.Add(self.cancel, 0, 0, 5)
sizer_1.Add(sizer_3, 0, wx.ALL|wx.ALIGN_RIGHT, 10)
self.SetAutoLayout(1)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
示例15: create_widget
# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticLine [as 别名]
def create_widget(self):
self.widget = wx.StaticLine(self.parent_window.widget, self.id, style=self.style)
self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_set_focus)