mail-archives/gtk-sharp-list/2005-August/006280.html

90 строки
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] Gtk.TextView ?
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Gtk.TextView%20%3F&In-Reply-To=b9cc72240508031325579ef257%40mail.gmail.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="006276.html">
<LINK REL="Next" HREF="006278.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] Gtk.TextView ?</H1>
<B>Peter Johanson</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Gtk.TextView%20%3F&In-Reply-To=b9cc72240508031325579ef257%40mail.gmail.com"
TITLE="[Gtk-sharp-list] Gtk.TextView ?">latexer at gentoo.org
</A><BR>
<I>Wed Aug 3 21:39:27 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="006276.html">[Gtk-sharp-list] Gtk.TextView ?
</A></li>
<LI>Next message: <A HREF="006278.html">[Gtk-sharp-list] Gtk.Label : Text Direction
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6280">[ date ]</a>
<a href="thread.html#6280">[ thread ]</a>
<a href="subject.html#6280">[ subject ]</a>
<a href="author.html#6280">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Wed, Aug 03, 2005 at 05:25:19PM -0300, Paulo Alves Magalh?es Filho wrote:
&gt;<i>
</I>&gt;<i> How to know in which line/column the cursor is located ?
</I>
&lt;pseudo&gt;
TextView view = Gtk.TextView ()
TextBuffer buf = view.Buffer
TextIter iter = buf.GetIterAtMark (buf.InsertMark)
print iter.Line
print iter.LineOffset
&lt;/pseudo&gt;
&gt;<i>
</I>&gt;<i> I know that I must listen to an event, however do not know which and
</I>&gt;<i> nor as to intercept given of the current line and column.
</I>
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.
-pete
--
Peter Johanson
&lt;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">latexer at gentoo.org</A>&gt;
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="006276.html">[Gtk-sharp-list] Gtk.TextView ?
</A></li>
<LI>Next message: <A HREF="006278.html">[Gtk-sharp-list] Gtk.Label : Text Direction
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6280">[ date ]</a>
<a href="thread.html#6280">[ thread ]</a>
<a href="subject.html#6280">[ subject ]</a>
<a href="author.html#6280">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>