[gtkada] Coloring a window
Grein, Christoph
christoph.grein at eurocopter.com
Wed May 15 06:08:18 CEST 2002
Hi folks,
how do I color my main window? This is the code generated by Glade. The lines
commented out were added by me to define a color in the color map, but this
crashes the program. And if it worked, how would I apply the color defined to my
window background?
Thanx for the help.
Christoph Grein
-- with Glib; use Glib;
-- with Gdk.Color, Gtk.Widget;
with Gtk.Main;
with FSMedit_Pkg; use FSMedit_Pkg; -- generated by Glade
procedure Run is
-- Color : Gdk.Color.Gdk_Color;
-- Colormap: Gdk.Color.Gdk_Colormap := Gtk.Widget.Get_Default_Colormap;
begin
Gtk.Main.Set_Locale;
Gtk.Main.Init;
-- Gdk.Color.Set_RGB (Color, Red => 219*Gushort'Last/255,
-- Green => 255*Gushort'Last/255,
-- Blue => 170*Gushort'Last/255);
-- Gdk.Color.Alloc (Colormap, Color);
-- Set_Colormap (FSMedit, Colormap);
Gtk_New (FSMedit);
Show_All (FSMedit);
Gtk.Main.Main;
end Run;
More information about the gtkada
mailing list