def onItemSelected(self, ev): """Handle the wxWidgets event that is sent when the current selection changes in the list box. @param ev A wxWidgets event. """ ev.Skip() events.send( events.SelectNotify(self.widgetId, self.items[ev.GetSelection()][0]))
def onTabChange(self, ev): """Handle the wxWidgets event that occurs when the currently selected tab changes.""" # Figure out which panel is now visible. tabPanel = self.getWxWidget().GetPage(ev.GetSelection()) # Send a notification event. notification = events.SelectNotify(self.widgetId, self.__lookupPanel(tabPanel)) events.send(notification)
def onRightDown(self, event): """Right button down.""" w = self.getWxWidget() #print "right down in list " + str(event.GetPosition()) item = w.HitTest(event.GetPosition()) #print item if item >= 0: w.SetSelection(item) if self.widgetId: events.send( events.SelectNotify(self.widgetId, self.items[item][0])) event.Skip()
def onItemSelected(self, event): """Handle the wxWidgets item selection event. @param event A wxWidgets event. """ if self.widgetId and self.style == List.STYLE_COLUMNS: # Identifier of the selected item is sent with the # notification. item = self.items[self.getWxWidget().GetItemData(event.GetIndex())] # Send a notification about the selected item. events.send(events.SelectNotify(self.widgetId, item)) event.Skip() self.react()
def onItemSelected(self, ev): """Handle the wxWidgets event that is sent when the current selection changes in the list box. @param ev A wxWidgets event. """ if self.widgetId: newSelection = self.items[ev.GetSelection()] if sb.confdb.isSettingDefined(self.widgetId): # This is a setting. if newSelection == 'default': pr.getActive().removeValue(self.widgetId) else: pr.getActive().setValue(self.widgetId, newSelection) # Notify everyone of the change. events.send(events.EditNotify(self.widgetId, newSelection)) else: # Normal list. events.send(events.SelectNotify(self.widgetId, newSelection))
def onItemDoubleClick(self, ev): ev.Skip() events.send( events.SelectNotify(self.widgetId, self.items[ev.GetSelection()][0], True))
def onSelectionChanged(self, treeEvent): """Send a notification that the selection has changed in the tree.""" item = treeEvent.GetItem() events.send(events.SelectNotify(self.widgetId, self.lookupItem(item)))
def onPageChange(self, event): pageId = event.GetPage().getId() events.send(events.SelectNotify('wizard', pageId)) if self.pageReaction: self.pageReaction(event.GetPage())