Getting the Coords of TextView cursor

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

 



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 
 

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux