def _handle_db_click(self, event): Debug.printe(event, Debug.Level.INFO) item = self._listbox.get(ACTIVE) results = WallTextureDialog(self, populator=WallTextureContainer(self._items[item])) self._remove_texture() self._add_new_texture(results._entries) pass
def _handle_db_click(self, event): """ Handle mouse double click as a callback function Handles a mouse double click through the opening of an editing dialog for the picture item that was selected :param event: The event generated by the window manager, automatically provided """ Debug.printe(event, Debug.Level.INFO) item = self._listbox.get(ACTIVE) results = NodePictureDialog(self, populator=NodePictureContainer(self._items[item])) self._remove_wall_pic() self._add_new_wall_pic(results._entries)
def _handle_r_click(self, event): """ Handle mouse right click as a callback function Handle mouse right click by displaying a context menu for this widget, allow the addition and removal of window pics :param event: The event generated by the window manager, automatically provided """ Debug.printe(event, Debug.Level.INFO) # Create the menu to display p_menu = Menu(self._parent) p_menu.add_command(label="Add Picture", command=lambda: self._add_new_wall_pic()) p_menu.add_command(label="Delete Picture", command=lambda: self._remove_wall_pic()) p_menu.add_command(label="Delete All", command=lambda: self.remove_all()) p_menu.post(event.x_root, event.y_root)