本文整理汇总了Python中wx.ID_ANY属性的典型用法代码示例。如果您正苦于以下问题:Python wx.ID_ANY属性的具体用法?Python wx.ID_ANY怎么用?Python wx.ID_ANY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.ID_ANY属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, parent=None, id=wx.ID_ANY):
super().__init__(parent, id)
sizer = wx.BoxSizer(wx.HORIZONTAL)
# Translators: The label of an edit field in connect dialog to enter name or address of the remote computer.
sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Host:")))
self.host = wx.TextCtrl(self, wx.ID_ANY)
sizer.Add(self.host)
# Translators: Label of the edit field to enter key (password) to secure the remote connection.
sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Key:")))
self.key = wx.TextCtrl(self, wx.ID_ANY)
sizer.Add(self.key)
# Translators: The button used to generate a random key/password.
self.generate_key = wx.Button(parent=self, label=_("&Generate Key"))
self.generate_key.Bind(wx.EVT_BUTTON, self.on_generate_key)
sizer.Add(self.generate_key)
self.SetSizerAndFit(sizer)
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, parent):
wx.Button.__init__(self, parent, wx.ID_ANY, "Axes: ",
style=wx.BU_EXACTFIT)
self._toolbar = parent
self._menu = wx.Menu()
self._axisId = []
# First two menu items never change...
self._allId = wx.NewId()
self._invertId = wx.NewId()
self._menu.Append(self._allId, "All", "Select all axes", False)
self._menu.Append(self._invertId, "Invert", "Invert axes selected",
False)
self._menu.AppendSeparator()
self.Bind(wx.EVT_BUTTON, self._onMenuButton, id=self.GetId())
self.Bind(wx.EVT_MENU, self._handleSelectAllAxes, id=self._allId)
self.Bind(wx.EVT_MENU, self._handleInvertAxesSelected,
id=self._invertId)
示例3: on_option_tab_create
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def on_option_tab_create(self, notebook):
self.panel = wx.Panel(notebook, wx.ID_ANY)
self.panel_name = _('WebSocket Server')
self.layout = wx.BoxSizer(wx.VERTICAL)
self.check_enable = wx.CheckBox(
self.panel, wx.ID_ANY, _('Enable WebSocket Server'))
self.edit_port = wx.TextCtrl(self.panel, wx.ID_ANY, 'port')
layout = wx.GridSizer(2)
layout.Add(wx.StaticText(self.panel, wx.ID_ANY, _('Listen port')))
layout.Add(self.edit_port)
self.layout.Add(self.check_enable)
self.layout.Add(wx.StaticText(
self.panel, wx.ID_ANY,
_('WARNING: The server is accessible by anyone.'),
))
self.layout.Add(layout, flag=wx.EXPAND)
self.panel.SetSizer(self.layout)
示例4: on_option_tab_create
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def on_option_tab_create(self, notebook):
self.panel = wx.Panel(notebook, wx.ID_ANY, size=(640, 360))
self.panel_name = 'Hue'
self.layout = wx.BoxSizer(wx.VERTICAL)
self.panel.SetSizer(self.layout)
self.checkEnable = wx.CheckBox(self.panel, wx.ID_ANY, u'Hue と連携')
self.editHueHost = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')
self.editHueUsername = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')
try:
layout = wx.GridSizer(2, 2)
except:
layout = wx.GridSizer(2)
layout.Add(wx.StaticText(self.panel, wx.ID_ANY, u'ホスト'))
layout.Add(self.editHueHost)
layout.Add(wx.StaticText(self.panel, wx.ID_ANY, u'ユーザ'))
layout.Add(self.editHueUsername)
self.layout.Add(self.checkEnable)
self.layout.Add(layout)
# enhance_color and rgb2xy is imported from:
# https://gist.githubusercontent.com/error454/6b94c46d1f7512ffe5ee/raw/73b190ce256c3d8dd540cc34e6dae43848cbce4c/gistfile1.py
# All the rights belongs to the author.
示例5: on_option_tab_create
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def on_option_tab_create(self, notebook):
self.panel = wx.Panel(notebook, wx.ID_ANY)
self.panel_name = _('CSV')
self.layout = wx.BoxSizer(wx.VERTICAL)
self.panel.SetSizer(self.layout)
self.checkEnable = wx.CheckBox(
self.panel, wx.ID_ANY, _('Enable CSV Log'))
self.editCsvFilename = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')
self.layout.Add(wx.StaticText(self.panel, wx.ID_ANY, _('Log Filename')))
self.layout.Add(self.editCsvFilename, flag=wx.EXPAND)
self.layout.Add(self.checkEnable)
##
# Write a line to text file.
# @param self The Object Pointer.
# @param record Record (text)
#
示例6: on_option_tab_create
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def on_option_tab_create(self, notebook):
self.panel = wx.Panel(notebook, wx.ID_ANY)
self.panel_name = _('Screenshot')
self.layout = wx.BoxSizer(wx.VERTICAL)
self.panel.SetSizer(self.layout)
self.checkResultDetailEnable = wx.CheckBox(
self.panel, wx.ID_ANY, _('Save screenshots of game results'))
self.editDir = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')
self.layout.Add(wx.StaticText(
self.panel, wx.ID_ANY, _('Folder to save screenshots')))
self.layout.Add(self.editDir, flag=wx.EXPAND)
self.layout.Add(self.checkResultDetailEnable)
self.panel.SetSizer(self.layout)
##
# on_result_detail_still Hook
# @param self The Object Pointer
# @param context IkaLog context
#
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, *args, **kwargs):
wx.Panel.__init__(self, *args, **kwargs)
# This is used to determine if a file dialog is open or not.
self.prev_file_path = ''
# Textbox for input file
self.text_ctrl = wx.TextCtrl(self, wx.ID_ANY, '')
self.text_ctrl.Bind(wx.EVT_TEXT, self.on_text_input)
self.button = wx.Button(self, wx.ID_ANY, _('Browse'))
self.button.Bind(wx.EVT_BUTTON, self.on_button_click)
# Drag and drop
drop_target = FileDropTarget(self)
self.text_ctrl.SetDropTarget(drop_target)
top_sizer = wx.BoxSizer(wx.HORIZONTAL)
top_sizer.Add(self.text_ctrl, proportion=1)
top_sizer.Add(self.button)
self.SetSizer(top_sizer)
示例8: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, engine, outputs):
self.engine = engine
self.capture = engine.capture
self.outputs = outputs
self.frame = wx.Frame(None, wx.ID_ANY, "IkaLog GUI", size=(700, 500))
self.options_gui = OptionsGUI(self)
self.last_result = ResultsGUI(self)
self.layout = wx.BoxSizer(wx.VERTICAL)
self.create_buttons_ui()
self.layout.Add(self.buttons_layout)
self.preview = PreviewPanel(self.frame, size=(640, 420))
self.preview.Bind(EVT_INPUT_FILE_ADDED, self.on_input_file_added)
self.preview.Bind(EVT_IKALOG_PAUSE, self.on_ikalog_pause)
self.layout.Add(self.preview, flag=wx.EXPAND)
self.frame.SetSizer(self.layout)
# Frame events
self.frame.Bind(wx.EVT_CLOSE, self.on_close)
# Video files processed and to be processed.
self._file_list = []
示例9: CreatePopupMenu
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def CreatePopupMenu(self):
menu = wx.Menu()
mi = menu.Append(wx.ID_ANY, self.bgapp.utility.lang.get('options_etc'))
self.Bind(wx.EVT_MENU, self.OnOptions, id=mi.GetId())
menu.AppendSeparator()
if self.bgapp.user_profile is not None:
mi = menu.Append(wx.ID_ANY, self.bgapp.utility.lang.get('user_profile'))
self.Bind(wx.EVT_MENU, self.OnUserProfile, id=mi.GetId())
menu.AppendSeparator()
mi = menu.Append(wx.ID_ANY, self.bgapp.utility.lang.get('create_stream'))
self.Bind(wx.EVT_MENU, self.OnStream, id=mi.GetId())
menu.AppendSeparator()
if DEBUG:
mi = menu.Append(wx.ID_ANY, 'Statistics')
self.Bind(wx.EVT_MENU, self.OnStat, id=mi.GetId())
menu.AppendSeparator()
if DEBUG_LIVE:
mi = menu.Append(wx.ID_ANY, 'Live')
self.Bind(wx.EVT_MENU, self.OnLive, id=mi.GetId())
menu.AppendSeparator()
mi = menu.Append(wx.ID_ANY, self.bgapp.utility.lang.get('menuexit'))
self.Bind(wx.EVT_MENU, self.OnExitClient, id=mi.GetId())
return menu
示例10: _init_default_values
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def _init_default_values(self):
""" Initialise default values for various things ... """
self.figs = []
self.canvases = []
self.fig_IDs = []
self.hold = False
self.fit_algorithm = 'Marquardt-Levenberg'
self.already_fitting = False
self.warnings = True
# initialise advanced fit options dictionary
dlg = AdvancedFitOptions(self,"Advanced Fit Options",wx.ID_ANY)
self.advanced_fitoptions = dlg.return_all_options()
dlg.Destroy()
示例11: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [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
示例12: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, parent):
wx.Dialog.__init__(self, parent, wx.ID_ANY, "Manual Entry", size=(650, 600))
self.panel = wx.Panel(self, wx.ID_ANY)
self.mainSizer = wx.BoxSizer(wx.VERTICAL)
self.folios = self.fetchFolios()
self.lblFolioD = wx.StaticText(self.panel, label="Folio (Debit)")
self.folioComboD = wx.ComboBox(self.panel, choices=list(self.folios.keys()))
self.mainSizer.Add(self.lblFolioD)
self.mainSizer.Add(self.folioComboD)
self.SetSizer(self.mainSizer)
self.Layout()
self.mainSizer.Fit(self.panel)
self.Centre(wx.BOTH)
self.Bind(wx.EVT_CLOSE, self.OnQuit)
self.Show()
示例13: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def __init__(self, parent):
# TODO: try to use MessageBox instead, as they already include buttons, icons, etc.
wx.Dialog.__init__(self, parent, title="SCT Processing")
self.SetSize((300, 120))
vbox = wx.BoxSizer(wx.VERTICAL)
lbldesc = wx.StaticText(self, id=wx.ID_ANY, label="Processing, please wait...")
vbox.Add(lbldesc, 0, wx.ALIGN_LEFT | wx.ALL, 10)
btns = self.CreateSeparatedButtonSizer(wx.CANCEL)
vbox.Add(btns, 0, wx.ALIGN_LEFT | wx.ALL, 5)
hbox = wx.BoxSizer(wx.HORIZONTAL)
# TODO: use a nicer image, showing two gears (similar to ID_EXECUTE)
save_ico = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_TOOLBAR, (50, 50))
img_info = wx.StaticBitmap(self, -1, save_ico, wx.DefaultPosition, (save_ico.GetWidth(), save_ico.GetHeight()))
hbox.Add(img_info, 0, wx.ALL, 10)
hbox.Add(vbox, 0, wx.ALL, 0)
self.SetSizer(hbox)
self.Centre()
self.CenterOnParent()
# TODO: retrieve action from the cancel button
示例14: createControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def createControls(self):
self.head1Label = wx.StaticText(self, label="Basic Information:")
self.head2Label = wx.StaticText(self, label="Database:")
self.head3Label = wx.StaticText(self, label="Modify/Review:")
# 1. Section
self.samplingrateLabel = wx.StaticText(self, label="Samp. period (sec):")
self.samplingrateTextCtrl = wx.TextCtrl(self, value="--",size=(160,30))
self.amountLabel = wx.StaticText(self, label="N of data point:")
self.amountTextCtrl = wx.TextCtrl(self, value="--",size=(160,30))
self.typeLabel = wx.StaticText(self, label="Datatype:")
self.typeTextCtrl = wx.TextCtrl(self, value="--",size=(160,30))
self.keysLabel = wx.StaticText(self, label="Used keys:")
self.keysTextCtrl = wx.TextCtrl(self, value="--",size=(160,30))
self.samplingrateTextCtrl.Disable()
self.amountTextCtrl.Disable()
self.typeTextCtrl.Disable()
self.keysTextCtrl.Disable()
self.getDBButton = wx.Button(self,-1,"Get from DB",size=(160,30))
self.putDBButton = wx.Button(self,-1,"Write to DB",size=(160,30))
self.MetaDataButton = wx.Button(self,-1,"Data related",size=(160,30))
self.dataTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.MetaSensorButton = wx.Button(self,-1,"Sensor related",size=(160,30))
self.sensorTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.MetaStationButton = wx.Button(self,-1,"Station related",size=(160,30))
self.stationTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
示例15: createControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ID_ANY [as 别名]
def createControls(self):
self.sourceLabel = wx.StaticText(self, label="Data source:")
self.diLabel = wx.StaticText(self, label="Actions:")
self.loadDIButton = wx.Button(self,-1,"DI data",size=(160,30))
self.diSourceLabel = wx.StaticText(self, label="Source: None")
self.diTextCtrl = wx.TextCtrl(self, value="None",size=(160,40),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.defineVarioScalarButton = wx.Button(self,-1,"Vario/Scalar",size=(160,30))
self.VarioSourceLabel = wx.StaticText(self, label="Vario: None")
self.ScalarSourceLabel = wx.StaticText(self, label="Scalar: None")
self.varioTextCtrl = wx.TextCtrl(self, value="None",size=(160,40),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.defineParameterButton = wx.Button(self,-1,"Analysis parameter",size=(160,30))
self.parameterRadioBox = wx.RadioBox(self,label="parameter source",choices=self.choices, majorDimension=2, style=wx.RA_SPECIFY_COLS,size=(160,50))
#self.parameterTextCtrl = wx.TextCtrl(self, value="Default",size=(160,30),
# style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.scalarTextCtrl = wx.TextCtrl(self, value="None",size=(160,40),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
self.AnalyzeButton = wx.Button(self,-1,"Analyze",size=(160,30))
self.logLabel = wx.StaticText(self, label="Logging:")
#self.exportButton = wx.Button(self,-1,"Export...",size=(160,30))
self.ClearLogButton = wx.Button(self,-1,"Clear Log",size=(160,30))
self.SaveLogButton = wx.Button(self,-1,"Save Log",size=(160,30))
self.dilogTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,200),
style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
#self.varioExtComboBox = wx.ComboBox(self, choices=self.varioext,
# style=wx.CB_DROPDOWN, value=self.varioext[0],size=(160,-1))
#self.scalarExtComboBox = wx.ComboBox(self, choices=self.scalarext,
# style=wx.CB_DROPDOWN, value=self.scalarext[0],size=(160,-1))