Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gtk.Treeview get current row index in Python

How to get index of current selected row in Gtk.TreeView in Python ?

like image 875
deni123 Avatar asked Jul 10 '12 05:07

deni123


1 Answers

The other answer is likely more useful in general. However, to answer the actual question posed by the OP, how to get the row index: assuming one row is selected, you can get it with:

index = treeview.get_selection().get_selected_rows()[1][0][0]
like image 94
Rboreal_Frippery Avatar answered Oct 07 '22 03:10

Rboreal_Frippery