# Need help with tree cursor

**URL:** <https://www.ruby-forum.com/t/need-help-with-tree-cursor/211444>\
**Category:** Ruby-Gnome 2\
**Created:** [September 4, 2011, 2:36pm UTC](https://www.ruby-forum.com/t/need-help-with-tree-cursor/211444 "2011-09-04T14:36:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 4, 2011, 2:36pm UTC](https://www.ruby-forum.com/t/need-help-with-tree-cursor/211444/1 "2011-09-04T14:36:19Z")

</div>

Hi, a question here

How do I move cursor in tree view (with liststore as model) without  
using  
mouse click or arrow?  
I mean something like press F1 and it moves to first row?  
I can’t get it to work especially if tree row has not been focused  
before  
I hope someone can help  
Thanks

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [September 4, 2011, 3:01pm UTC](https://www.ruby-forum.com/t/need-help-with-tree-cursor/211444/2 "2011-09-04T15:01:42Z")

</div>

Nevermind. I’ve grab some understanding about path and it solves my  
problem  
only got to know row number I want to jump to, then set\_cursor  
GTK::TreePath.new(row\_number\_I\_want\_as\_string, nil, nil)  
Solved it.  
Thanks anyway. This is a great library. Really enjoy making software  
using  
this 🙂
