本文整理汇总了Python中wx.EVT_LIST_ITEM_ACTIVATED属性的典型用法代码示例。如果您正苦于以下问题:Python wx.EVT_LIST_ITEM_ACTIVATED属性的具体用法?Python wx.EVT_LIST_ITEM_ACTIVATED怎么用?Python wx.EVT_LIST_ITEM_ACTIVATED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.EVT_LIST_ITEM_ACTIVATED属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DoInsertPage
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def DoInsertPage(self, page, pos):
if not isinstance(page, wx.Window):
page=page(self)
ctl=page.GetControl()
if pos == None:
self.AddPage(ctl, page.name)
self.pages.append(page)
else:
self.InsertPage(pos, ctl, page.name)
self.pages.insert(pos, page)
if isinstance(ctl, wx.ListCtrl):
ctl.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemDoubleClick)
ctl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnItemRightClick)
ctl.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)
if wx.Platform == "__WXMSW__":
ctl.Bind(wx.EVT_RIGHT_UP, self.OnItemRightClick)
示例2: _init_list_ctrl
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def _init_list_ctrl(self):
# Set up list control
listID = wx.NewId()
self.ServicesList = AutoWidthListCtrl(
id=listID,
name='ServicesList', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0),
style=wx.LC_REPORT | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING | wx.LC_SINGLE_SEL)
self.ServicesList.InsertColumn(0, _('NAME'))
self.ServicesList.InsertColumn(1, _('TYPE'))
self.ServicesList.InsertColumn(2, _('IP'))
self.ServicesList.InsertColumn(3, _('PORT'))
self.ServicesList.SetColumnWidth(0, 150)
self.ServicesList.SetColumnWidth(1, 150)
self.ServicesList.SetColumnWidth(2, 150)
self.ServicesList.SetColumnWidth(3, 150)
self.ServicesList.SetInitialSize(wx.Size(-1, 300))
self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, id=listID)
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated, id=listID)
示例3: CreateControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def CreateControls(self):
"""Create our sub-controls"""
wx.EVT_LIST_COL_CLICK(self, self.GetId(), self.OnReorder)
wx.EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnNodeSelected)
wx.EVT_MOTION(self, self.OnMouseMove)
wx.EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnNodeActivated)
self.CreateColumns()
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def __init__(self, parentWin, node, parentNode=None):
adm.PropertyDialog.__init__(self, parentWin, node, parentNode)
self.Bind("MailboxName Comment Squat StorageQuota AclRecursive")
if node and node.CanSelect():
self['ACL'].Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnClickAcl)
self['ACL'].Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnRightClickAcl)
self.Bind('AddAcl', self.OnAddAcl)
else:
self.EnableControls("AddAcl ACL", False)
if node and node.GetServer().flavor != "cyrus":
self.EnableControls("Squat", False)
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: DeviceManager.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((707, 337))
self.devices_list = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.new_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_plus_50.GetBitmap())
self.remove_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_trash_50.GetBitmap())
self.device_properties_button = wx.BitmapButton(self, wx.ID_ANY, icons8_administrative_tools_50.GetBitmap())
self.move_item_up_button = wx.BitmapButton(self, wx.ID_ANY, icons8up.GetBitmap())
self.move_item_down_button = wx.BitmapButton(self, wx.ID_ANY, icons8_down.GetBitmap())
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.devices_list)
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_list_item_activated, self.devices_list)
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_list_right_click, self.devices_list)
self.Bind(wx.EVT_BUTTON, self.on_button_new, self.new_device_button)
self.Bind(wx.EVT_BUTTON, self.on_button_remove, self.remove_device_button)
self.Bind(wx.EVT_BUTTON, self.on_button_properties, self.device_properties_button)
self.Bind(wx.EVT_BUTTON, self.on_button_up, self.move_item_up_button)
self.Bind(wx.EVT_BUTTON, self.on_button_down, self.move_item_down_button)
# end wxGlade
self.Bind(wx.EVT_CLOSE, self.on_close, self)
示例6: BuildUI
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def BuildUI(self):
self.SearchFile = wx.SearchCtrl(self)
self.myOlv = ObjectListView(self, -1,
style=wx.LC_REPORT | wx.SUNKEN_BORDER)
size_main = wx.BoxSizer(wx.VERTICAL)
size_main.Add(self.SearchFile, 1, wx.ALL | wx.EXPAND, 2)
size_main.Add(self.myOlv, 20, wx.ALL | wx.EXPAND, 4)
self.SetSizer(size_main)
self.Layout()
self.CenterOnScreen()
self.myOlv.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnOpenFile)
self.myOlv.Bind(wx.EVT_LIST_KEY_DOWN, self.OnKeyDown)
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_ITEM_ACTIVATED [as 别名]
def __init__(self):
self.conf = Conf()
self.home = self.conf.home
self.currentpath = self.home+self.conf.get('GENERAL', 'op_folder')+'/openplotter'
Language(self.conf)
wx.Frame.__init__(self, None, title=_('NMEA 0183 generator'), size=(690,350))
self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
self.icon = wx.Icon(self.currentpath+'/openplotter.ico', wx.BITMAP_TYPE_ICO)
self.SetIcon(self.icon)
wx.StaticBox(self, label=_(' NMEA 0183 '), size=(670, 230), pos=(10, 10))
self.list_nmea = wx.ListCtrl(self, style=wx.LC_REPORT, size=(565, 200), pos=(15, 30))
self.list_nmea.InsertColumn(0, _('Sentence'), width=100)
self.list_nmea.InsertColumn(1, _('Rate'), width=50)
self.list_nmea.InsertColumn(2, _('Fields'), width=1500)
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.edit_nmea, self.list_nmea)
self.add_nmea_button =wx.Button(self, label=_('add'), pos=(585, 30))
self.Bind(wx.EVT_BUTTON, self.add_nmea, self.add_nmea_button)
self.delete_nmea_button =wx.Button(self, label=_('delete'), pos=(585, 65))
self.Bind(wx.EVT_BUTTON, self.delete_nmea, self.delete_nmea_button)
self.compat_nmea_button =wx.Button(self, label=_('opencpn\ndefault'), pos=(585, 189))
self.Bind(wx.EVT_BUTTON, self.compat_nmea, self.compat_nmea_button)
self.diagnostic_nmea_button=wx.Button(self, label=_('NMEA Diagnostic'), pos=(10, 250))
self.Bind(wx.EVT_BUTTON, self.kplex_diagnostic, self.diagnostic_nmea_button)
self.diagnostic_sk_button=wx.Button(self, label=_('SK Diagnostic'), pos=(180, 250))
self.Bind(wx.EVT_BUTTON, self.sk_diagnostic, self.diagnostic_sk_button)
self.CreateStatusBar()
self.Centre()
self.Show(True)
self.read_sentences()