Re: getting the cursor location of a textbuffer

From: Date: Wed, 30 Aug 2006 10:44:38 +0000
Subject: Re: getting the cursor location of a textbuffer
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7143@lists.php.net to get a copy of this message
Gell6, You must use the GtkTextBuffer::get_insert() method to retrieve a GtkTextMark that corresponds to the current cursor position and then pass that mark to GtkTextBuffer::get_iter_at_mark() For instance, if your GtkTextBuffer is called $buffer: $iter = $buffer->get_iter_at_mark($buffer->get_insert()); $lineNumber = $iter->get_line(); Hope this helps, - Anant

« previous php.gtk.general (#7143) next »