Last active
December 17, 2015 18:29
-
-
Save np1/5653451 to your computer and use it in GitHub Desktop.
Gtk get tree selection rownumber and contents #Python #Gtk #Treeview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def on_tree_selection_changed(self, selection): | |
model, treeiter = selection.get_selected() | |
if treeiter is not None: | |
rowcontents = model[treeiter][0:3] # for a 4 column treeview | |
rownumobj = model.get_path(treeiter) | |
rownum = int(rownumobj.to_string()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment