[gtkada] CellRendererText alignment

Manuel Op de Coul manuel.op.de.coul at eon-benelux.com
Mon Oct 27 10:20:52 CET 2003


Can someone help me with this: I'd like to set the alignment of
text inside treeview cells, so I wrote:

declare
   Render1 : Gtk_Cell_Renderer_Text;
   Align_Property : constant Glib.Properties.Property_Float :=
     Glib.Properties.Build ("xalign");
begin
   Gtk_New (Render1);
   Glib.Properties.Set_Property(Render1, Align_Property, 1.0);

This compiles ok, but doesn't work and gives a glib-object-warning
saying: [Invalid UTF-8] gobject.c:882: object class
`GtkCellRendererText' has no property named `<junk>'
where <junk> is three random characters.
Adding extra conversion to UTF-8 (shouldn't need) didn't help
as expected.

Also tried it another way:

declare
   Col1 : Gtk_Tree_View_Column;
   Align_Property : constant Glib.Properties.Property_Float :=
     Glib.Properties.Build ("alignment");
begin
   Gtk_New (Col1);
   Glib.Properties.Set_Property(Col1, Align_Property, 1.0);

This gives the same problem.
Am I doing something wrong? But it looks more like a binding
error.
If so, is there a workaround?

Thanks,

Manuel






More information about the gtkada mailing list