[gtkada] Changing the color of a label
Jean-Pierre Rosen
rosen.adalog at wanadoo.fr
Fri Jun 20 10:33:14 CEST 2003
> 1) [Gtkada 2.0]
I want Windows compatibility, so I'm under 1.x
> 2) [GtkAda 1.X-2.0] put a Evenbox first and then put the label in the
> Eventbox. Now you can set the background of the Eventbox. Labels
> don't have backgrounds. (I think this works in GtkAda 2.0 too, but
> I haven't checked.)
>
> Example for GtkAda 1.x:
>
> Gtk_New (Background_Eventbox);
> Set_Border_Width (Background_Eventbox, 1);
> Add (Some_Box, Background_Eventbox);
>
> Gtk_New (Title_Label, "Title");
> Set_Alignment (Title_Label, 0.0, 0.5);
> Set_Justify (Title_Label, Justify_Left);
> Set_Padding (Title_Label, 3, 1);
> Set_Line_Wrap (Title_Label, False);
> Add (Background_Eventbox, Title_Label);
I thought an EventBox was for attaching events, but why not...
Until this point, I understand.
> Background_Eventbox_Style :=
> Copy (Get_Style (Background_Eventbox));
>
> -- Now you can set the background colour on the Eventbox.
?? I'm lost here. What is this Background_Eventbox_Style variable?
And how can I set the background colour of the EventBox? I didn't find a
procedure for that in the RM...
---------------------------------------------------------
J-P. Rosen (rosen at adalog.fr)
Visit Adalog's web site at http://www.adalog.fr
More information about the gtkada
mailing list