Right-click brings up an option menu

Laughlin, Joseph V Joseph.V.Laughlin at boeing.com
Mon May 24 13:57:09 EDT 2004


I'm fairly new to graphical programming, and python in general, so be
gentle..

I have a treeview widget populated with some rows.  I'm getting the
treeview from a glade file.  I want the user to be able to right clck on
a row and have an option menu pop up with various options that the user
can perform on the row.

Here's a snipit of my code, to give you an idea of where I am:

node_gui = gtk.glade.XML(self.gladefile, "Window_Node_Info") model =
gtk.TreeStore(gobject.TYPE_STRING,
                              gobject.TYPE_STRING)
tree_view = node_gui.get_widget("list_tree")
tree_view.set_model(model)
renderer = gtk.CellRendererText()
column = gtk.TreeViewColumn("Process ID", renderer, text=0)
tree_view.append_column(column)
column = gtk.TreeViewColumn("Process Name", renderer, text=1)
tree_view.append_column(column)

Anyone have any ideas of where I can go from here?

Thanks,


Joe Laughlin
Phantom Works - Integrated Technology Development Labs 
The Boeing Company







More information about the Python-list mailing list