Getting the Coords of TextView cursor
- From: Pramod Patangay <pramod_iitg yahoo com>
- To: gtk-list gnome org
- Subject: Getting the Coords of TextView cursor
- Date: Mon, 14 Feb 2005 03:22:15 -0800 (PST)
Hi,
I am using a GtkTextView which is added to a
GtkScrolledWindow. Now whenever the GtkTextView gets
focus, I want the scrolled window to scroll in such a
manner so that the cursor is visible. How can I
achieve this?
One way I thought of is that, I get the location of
iterator where the cursor is placed and based on the
'Y' value of the location, I set the adjustment value
for the scrolled window. But this doesn't work since
the gtk_text_view_get_iter_location is returning same
value no matter where the cursor is, also converting
the values to window coords using
gtk_text_view_buffer_to_window_coords with
GTK_TEXT_WINDOW_WIDGET as the window type, gives weird
results.
Can anyone suggest a better working way to achieve the
same?
Thanks
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]