Re: cursor position in GtkTextView?



On Fri, Mar 28, 2003 at 02:38:20PM -0800, Vikram Bartakke wrote:

 Does anyone know how to find out position of cursor in the
 GtkTextView in terms of characters?

Get the cursor mark with gtk_text_buffer_get_insert() or whatever it's
called, then get the mark's location with
gtk_text_buffer_get_iter_at_mark(), then get the char offset of the
iter with gtk_text_iter_get_offset().

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]