[Gtk-sharp-list] Gtk.TextView ?

Peter Johanson latexer at gentoo.org
Wed Aug 3 21:39:27 EDT 2005

On Wed, Aug 03, 2005 at 05:25:19PM -0300, Paulo Alves Magalh?es Filho wrote:
> How to know in which line/column the cursor is located ?

TextView view = Gtk.TextView ()
TextBuffer buf = view.Buffer
TextIter iter = buf.GetIterAtMark (buf.InsertMark)
print iter.Line
print iter.LineOffset

> I know that I must listen to an event, however do not know which and
> nor as to intercept given of the current line and column.

As for events, I'm not sure if you mean an event for when the cursor
moves, or when the text changes. buf.Changed is an event for when the
buffer text changes, and view.MoveCursor should get fired when the
cursor moves.


Peter Johanson
<latexer at gentoo.org>

More information about the Gtk-sharp-list mailing list