[gtkada] gtk ada newbie question
alfonso_acosta_mail at yahoo.es
alfonso_acosta_mail at yahoo.es
Wed Apr 2 01:19:21 CEST 2003
hi:
Im sure Im commiting some newbie faults cause Im new to GUIs and gtkada,
I just want to see how a window appears with a colored backgroung using
gtk.extra.plot, here is the code
-------------------------------------------------------------------------
with Gtk.Main,
Gtk.Window,
Gtk.Extra.Plot,
Gtk.Box,
Gdk.Drawable,
Gdk.Color;
procedure Plot is
Window : Gtk.Window.Gtk_Window;
Vbox : Gtk.Box.Gtk_Box;
Plot : Gtk.Extra.Plot.Gtk_Plot;
Dibujo : Gdk.Drawable.Gdk_Drawable;
Color : Gdk.Color.Gdk_Color;
begin
Gdk.Color.Set_RGB( Color, Red => 13, Green => 123, Blue => 198);
Gtk.Main.Init;
Gtk.Window.Gtk_New (Window);
Gtk.Window.Set_Title (Window, "Funcionara el plot?");
Gtk.Box.Gtk_New_Vbox (Vbox, Homogeneous => False, Spacing => 0);
Gtk.Window.Add (Window, Vbox);
Gtk.Extra.Plot.Gtk_New (Plot, 200.0, 200.0, Dibujo);
Gtk.Extra.Plot.Set_Background(Plot, Color);
Gtk.Box.Pack_Start(In_Box => Vbox, Child => Plot);
Gtk.Extra.Plot.Show (Plot);
Gtk.Window.Show (Window);
Gtk.Main.Main;
end Plot;
--------------------------------------------------------------------------
What am I doing wrong?
Thanks in advance:
Alfonso Acosta
More information about the gtkada
mailing list