Re: getting the cursor location of a textbuffer
| From: | Scott Mattocks | Date: | Tue, 29 Aug 2006 16:47:28 +0000 |
| Subject: | Re: getting the cursor location of a textbuffer | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7130@lists.php.net to get a copy of this message | ||
gell6 wrote:
I'm trying to get the line number at which the cursor is positioned in a gtk textbuffer. How can i do this?To get the line number you need a GtkTextIter. You can get the iter at the current cursor position by calling GtkTextBuffer::get_iter_at_mark('insert'); Once you have that iter, you call $iter->get_line() to get the line number of the current cursor position. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com