Cursor over widget



Hello,

I'm trying to get the cursor taking some look whenever the user
move it over a drawingarea. I'm first getting the window from the
widget, then setting the cursor for that window.

Window := Gtk.Widget.Get_Window (Gtk.Widget.Gtk_Widget(Area));
Gdk.Window.Set_Cursor (Window, MainCursor);

MainCursor have already been created via a Gtk_cursor_New...

During execution, somme assert are violated, and the cursor is not
changed when the mouse goes over the window.

gdkwindow.c line 1455 assertion 'window!= null' failed

I may have a problem with the window since Set_Cursor is modifiying it,
(in out parameter) and i do not put it back in the widget (ie i'm updating
the window of the widget, but the window it has gived back to me as a result
of the function)

Is there a way to get access to the window of a widget in GtkAda, and
what am i doing wrong ?

(As it may be far too visible, i'm a begginer as it come to Gtk/Gdk :) )

Thanks,

Guillaume PATRY






------------------------------------------------------------------
Patry Guillaume LISI /ENSMA
Doctoral Student Site du Futuroscope, BP 109
tel: 05.49.49.80.70 Futuroscope Cedex 9 France
------------------------------------------------------------------


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