[gtkada] How to change cursor from default arrow

Brian Beckrich beckrich at mcci-arl-va.com
Wed Jan 10 16:23:02 CET 2001


In the gdk-window spec there is a Set_Cursor procedure.

something along the lines of the following may work for you:

procedure Set_My_Cursor (A_Window: Gtk.Window.Gtk_Window;
                         To_Cursor: Gdk.Types.Gdk_Cursor_Type) is
  My_Gdk_Window: Gdk_Window;
  My_Gdk_Cursor: Gdk_Cursor;
begin
  My_Gdk_Window:= Gtk.Widget.Get_Window (A_Window);
  Gdk.Cursor.Gdk_New (My_Gdk_Cursor, To_Cursor);
  Gdk.Window.Set_Cursor (My_Gdk_Window, My_Gdk_Cursor);
end Set_My_Cursor;

don't forget to destroy the cursor.

also, this is pretty fast and dirty and may not be the correct/best
way, so...

>>>>> "Bade" == Bade, Frank <Frank.Bade at astrium-space.com> writes:

    Bade> Hi !  I just started developing with GtkAda and I do not
    Bade> know, how to change the cursor from the default arrao to
    Bade> e.g. a clock to indicate the busy state of the application.

    Bade> Thanks in advance Frank -- ..........................
    Bade> Astrium SI ..............................  Frank Bade Tel:
    Bade> +49-421-5395648 Dep.: IO 62 Fax: +49-421-5394378





More information about the gtkada mailing list