[gtkada] Set_Foreground

Preben Randhol randhol at pvv.org
Thu Jul 24 17:20:34 CEST 2003


Manuel Op de Coul <manuel.op.de.coul at eon-benelux.com> wrote on 24/07/2003 (17:16) :

> Thanks to Preben's asking on the gtk list this mystery has been
> cleared up. So it's possible to set the entry colour, only it's not
> possible in GtkAda 2.2.0.

No see my other mail it is fully possible:


   Gtk_New (Window1.Red_Entry);
   Set_Editable (Window1.Red_Entry, True);
   Set_Max_Length (Window1.Red_Entry, 0);
   Set_Text (Window1.Red_Entry, -("Some red text hopefully"));
   Set_Visibility (Window1.Red_Entry, True);
   Set_Invisible_Char (Window1.Red_Entry, UTF8_Get_Char ("*"));

   Pack_Start
     (Window1.Vbox1,
      Window1.Red_Entry,
      Expand  => False,
      Fill    => False,
      Padding => 0);

   Gtk_New (Window1.Red_Style);
   Set_Rgb (Window1.Red_Colour, 50_535, 20_535, 20_535);
   Set_Text (Window1.Red_Style, State_Normal, Window1.Red_Colour);
   --  FIXME: You must allocate the colour etc... I was lazy.
   Set_Style (Window1.Red_Entry, Window1.Red_Style);

-- 
Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 --
                 «For me, Ada95 puts back the joy in programming.»



More information about the gtkada mailing list