Re: [gtk-list] catching resize; cursors




Alexander Kotelnikov <sacha@AK2614.spb.edu> writes:
> 1. I want to catch resize of a widget, so I put
> 
> gtk_signal_connect (GTK_OBJECT (widget), "configure_event",
>                    (GtkSignalFunc) configure_event, NULL);
> 
> in my code. But this works only if ``widget'' is my top level window :(
>

Connect to size_allocate instead.
 		   
> 2. I want to change cursor of a widget, but it seems that I need to show
> it (and all widgets it lays in) before putting
> 
> gdk_window_set_cursor (widget, gdk_cursor_new (c));
> 

Note that you have a mem leak here, you need to gdk_cursor_destroy() 
the cursor you are creating.

You might want to connect to the "realize" signal and set your cursor
there.

Havoc



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