Python wx.EVT_LIST_ITEM_ACTIVATED Examples
The following are 7
code examples of wx.EVT_LIST_ITEM_ACTIVATED().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: notebook.py From admin4 with Apache License 2.0 | 6 votes |
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)
Example #2
Source File: DiscoveryPanel.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
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)
Example #3
Source File: listviews.py From pyFileFixity with MIT License | 5 votes |
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()
Example #4
Source File: Mailbox.py From admin4 with Apache License 2.0 | 5 votes |
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)
Example #5
Source File: DeviceManager.py From meerk40t with MIT License | 5 votes |
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)
Example #6
Source File: frame_overview.py From bookhub with MIT License | 5 votes |
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)
Example #7
Source File: NMEA_0183_generator.py From openplotter with GNU General Public License v2.0 | 4 votes |
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()