本文整理汇总了Python中wx.DEFAULT_DIALOG_STYLE属性的典型用法代码示例。如果您正苦于以下问题:Python wx.DEFAULT_DIALOG_STYLE属性的具体用法?Python wx.DEFAULT_DIALOG_STYLE怎么用?Python wx.DEFAULT_DIALOG_STYLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.DEFAULT_DIALOG_STYLE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [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 DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, parent, help_entries):
wx.Dialog.__init__(self, parent, title="Help",
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
sizer = wx.BoxSizer(wx.VERTICAL)
grid_sizer = wx.FlexGridSizer(0, 3, 8, 6)
# create and add the entries
bold = self.GetFont().MakeBold()
for r, row in enumerate(self.headers + help_entries):
for (col, width) in zip(row, self.widths):
label = wx.StaticText(self, label=col)
if r == 0:
label.SetFont(bold)
label.Wrap(width)
grid_sizer.Add(label, 0, 0, 0)
# finalize layout, create button
sizer.Add(grid_sizer, 0, wx.ALL, 6)
OK = wx.Button(self, wx.ID_OK)
sizer.Add(OK, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 8)
self.SetSizer(sizer)
sizer.Fit(self)
self.Layout()
self.Bind(wx.EVT_CLOSE, self.OnClose)
OK.Bind(wx.EVT_BUTTON, self.OnClose)
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, parent, title, current_language):
style = wx.DEFAULT_DIALOG_STYLE
vbox = wx.BoxSizer(wx.VERTICAL)
wx.Dialog.__init__(self, parent, -1, title, style=style)
self.lbl = wx.StaticText(self, -1,
_("Choose language (requires restart to take full effect)"))
vbox.Add(self.lbl, 0, wx.ALL, 10)
self.language_choices = wx.ComboBox(self, -1,
choices=sorted(LANGUAGES.keys()),
style=wx.CB_READONLY)
self.language_choices.SetStringSelection(LANGUAGES_REVERSE[current_language])
vbox.Add(self.language_choices, 0, wx.ALL, 10)
buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
vbox.Add(buttons, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 10)
self.SetSizerAndFit(vbox)
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: webcamConfigDialog.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.testwebcambutton = wx.Button(self, wx.ID_ANY, _("Test Webcam"))
self.webcamtimestampcheck = wx.CheckBox(self, wx.ID_ANY, _("Show Timestamp"))
self.label_16 = wx.StaticText(self, wx.ID_ANY, _("Format:"))
self.webcam_timestamp_format = wx.TextCtrl(self, wx.ID_ANY, _("%Y-%m-%d %H:%M:%S"))
self.label_9 = wx.StaticText(self, wx.ID_ANY, _("File Prefix:"))
self.webcamprefixtext = wx.TextCtrl(self, wx.ID_ANY, _("cam_"))
self.label_10 = wx.StaticText(self, wx.ID_ANY, _("Save Folder:"))
self.webcamsavefoldertext = wx.TextCtrl(self, wx.ID_ANY, "")
self.webcamsavefolderbrowse = wx.Button(self, wx.ID_ANY, _("..."))
self.label_11 = wx.StaticText(self, wx.ID_ANY, _("File Format:"))
self.webcamformatcombo = wx.ComboBox(self, wx.ID_ANY, choices=[_("jpg"), _("png"), _("gif")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN)
self.webcamsavebutton = wx.Button(self, wx.ID_OK, "")
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.testWebcamPressed, self.testwebcambutton)
self.Bind(wx.EVT_BUTTON, self.webcamSaveFolderBrowse, self.webcamsavefolderbrowse)
# end wxGlade
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self,*args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self,*args, **kwds)
self.config = AppConfig()
tmdata = eval(self.config.c.get('config', 'multistep'))
self.text_ctrl_6 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[0][0]))
self.text_ctrl_7 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[0][1]))
self.text_ctrl_8 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[1][0]))
self.text_ctrl_9 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[1][1]))
self.text_ctrl_10 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[2][0]))
self.text_ctrl_11 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[2][1]))
self.text_ctrl_12 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[3][0]))
self.text_ctrl_13 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[3][1]))
self.text_ctrl_14 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[4][0]))
self.text_ctrl_15 = wx.TextCtrl(self, wx.ID_ANY, '{0}'.format(tmdata[4][1]))
self.button_9 = wx.Button(self, wx.ID_ANY, u"提交修改")
self.button_9.Bind(wx.EVT_BUTTON, self.onButton_9)
self.button_10 = wx.Button(self, wx.ID_ANY, u"关闭窗口")
self.button_10.Bind(wx.EVT_BUTTON, self.onButton_10)
self.ret = 0 # 算数项设置Dialog返回值
self.__set_properties()
self.__do_layout()
# end wxGlade
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.text_ctrl_6 = wx.TextCtrl(self, wx.ID_ANY, "0")
self.text_ctrl_7 = wx.TextCtrl(self, wx.ID_ANY, "20")
self.text_ctrl_8 = wx.TextCtrl(self, wx.ID_ANY, "0")
self.text_ctrl_9 = wx.TextCtrl(self, wx.ID_ANY, "20")
self.text_ctrl_10 = wx.TextCtrl(self, wx.ID_ANY, "0")
self.text_ctrl_11 = wx.TextCtrl(self, wx.ID_ANY, "20")
self.text_ctrl_12 = wx.TextCtrl(self, wx.ID_ANY, "0")
self.text_ctrl_13 = wx.TextCtrl(self, wx.ID_ANY, "20")
self.text_ctrl_14 = wx.TextCtrl(self, wx.ID_ANY, "0")
self.text_ctrl_15 = wx.TextCtrl(self, wx.ID_ANY, "20")
self.button_9 = wx.Button(self, wx.ID_ANY, u"提交修改")
self.button_10 = wx.Button(self, wx.ID_ANY, u"关闭窗口")
self.__set_properties()
self.__do_layout()
# end wxGlade
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [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)
示例8: create_widget
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def create_widget(self):
if self.parent:
parent = self.parent.widget
else:
parent = common.main
# we set always a default style because this is the best one for editing the dialog
# (for example, a dialog without a caption would be hard to move, etc.)
default_style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
if common.pin_design_window: default_style |= wx.STAY_ON_TOP
# change 2002-10-09: now we create a wxFrame instead of a wxDialog,
# because the latter gives troubles I wasn't able to solve when using wxPython 2.3.3.1 :-/
self.widget = wx.Frame(parent, self.id, "", style=default_style)
self.widget.SetBackgroundColour(compat.wx_SystemSettings_GetColour(wx.SYS_COLOUR_BTNFACE))
self._set_widget_icon()
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, parent, owner, items=None):
style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.WANTS_CHARS
wx.Dialog.__init__(self, parent, -1, _("Toolbar editor"), style=style)
self.create_gui()
self.bind_event_handlers()
self._set_tooltips()
self.owner = owner
self.handler_re = self.name_re = re.compile(r'^[a-zA-Z_]+[\w-]*(\[\w*\])*$')
self.selected_index = -1 # index of the selected element in the wx.ListCtrl menu_items
self._ignore_events = False
if items:
self.add_items(items)
self._select_item(0)
else:
self._enable_fields(False)
示例10: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: TemplateListDialog.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.template_names = wx.ListBox(self, wx.ID_ANY, choices=[])
self.template_name = wx.StaticText(self, wx.ID_ANY, _("wxGlade template:\n"))
self.author = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
self.description = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
self.instructions = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
self.btn_open = wx.Button(self, wx.ID_OPEN, "")
self.btn_edit = wx.Button(self, ID_EDIT, _("&Edit"))
self.btn_delete = wx.Button(self, wx.ID_DELETE, "")
self.btn_cancel = wx.Button(self, wx.ID_CANCEL, "")
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_LISTBOX_DCLICK, self.on_open, self.template_names)
self.Bind(wx.EVT_LISTBOX, self.on_select_template, self.template_names)
self.Bind(wx.EVT_BUTTON, self.on_open, self.btn_open)
self.Bind(wx.EVT_BUTTON, self.on_edit, id=ID_EDIT)
self.Bind(wx.EVT_BUTTON, self.on_delete, self.btn_delete)
# end wxGlade
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle("dialog")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add((0, 0), 0, 0, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyDialog
示例12: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle("dialog_1")
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
self.calendar_ctrl_1 = wx.adv.CalendarCtrl(self, wx.ID_ANY, style=0)
sizer_1.Add(self.calendar_ctrl_1, 0, 0, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyDialog
示例13: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle("dialog")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add((0, 0), 0, 0, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyDialog
示例14: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialogWithBases.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
MyDialogBase.__init__(self, *args, **kwds)
mydialogbases.MyDialogBase.__init__(self)
self.SetSize((400, 300))
self.SetTitle("dialog")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add((0, 0), 0, 0, 0)
self.SetSizer(sizer_1)
self.Layout()
# end wxGlade
# end of class MyDialogWithBases
示例15: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT_DIALOG_STYLE [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle("dialog_1")
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
self.calendar_ctrl_1 = wx.calendar.CalendarCtrl(self, wx.ID_ANY, style=0)
sizer_1.Add(self.calendar_ctrl_1, 0, 0, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyDialog