开发者

PyGTK treeview and row_activated callback

开发者 https://www.devze.com 2023-01-14 06:21 出处:网络
I\'m trying to retrieve the row data from a treemodel when the row_activated callback is fired. When row_activated is called, the \'path\' variable it passes is a tuple开发者_如何学Go. How do I easil

I'm trying to retrieve the row data from a treemodel when the row_activated callback is fired.

When row_activated is called, the 'path' variable it passes is a tuple开发者_如何学Go. How do I easily use this tuple to retrieve an iter and ultimately the data itself? The treemodel class has a function to convert a string into an iter, but it seems like there should be an easier way than converting the tuple to a string, then the string to an iter.


Answering my own question, it makes sense after 45 minutes of googling I solve my own problem 30 seconds after posting on StackOverflow.

I needed to use the get_iter function, not the get_iter_from_string function.

0

精彩评论

暂无评论...
验证码 换一张
取 消