Changing cursor in GtkTextView widget.
- From: Erik de Castro Lopo <mle+gtk mega-nerd com>
- To: gtk-app-devel-list gnome org
- Subject: Changing cursor in GtkTextView widget.
- Date: Wed, 19 Apr 2006 18:53:30 +1000
Hi all,
After calling gtk_widget_show_all () on the top level window, I
am able to change the cursor in an enclosed GtkTextView window by
doing:
GdkCursor *cursor = gdk_cursor_new (GDK_LEFT_PTR) ;
GdkWindow *window = gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT) ;
gdk_window_set_cursor (window, cursor) ;
gdk_cursor_destroy (cursor) ;
Unfortunately, doing this after the top level call to
gtk_widget_show_all () is a PITA and doing before fails because
the call to gtk_text_view_get_window () returns NULL.
Is there any way to change the cursor nefore the widget has been
fully set up and shown?
Cheers,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea." -- Alexander Viro on linux-kernel mailing list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]