[gtkada] Setting text weight in Cell_Renderer_Text

Manuel Op de Coul manuel.op.de.coul at eon-benelux.com
Thu Oct 9 15:33:00 CEST 2003


Duncan,

Remember you can also do this with markup. It's more flexible, you can
mix different weights and styles in one cell.

So instead of

   Add_Attribute (Col0, Renderer0, "text", 0);

do

   Add_Attribute (Col0, Renderer0, "markup", 0);


And in the text <span weight="bold">blabla</span>


But to answer your question, I also ran into this a while ago.
The problem is the GtkAda specs lack a few declarations which will make
it more obvious.
Here's an example with style of how to do it.
The Style_Property declaration should ideally be in the Pango.Enums spec.

with Pango.Enums; use Pango.Enums;

declare
   Style_Property : constant Style_Properties.Property :=
     Style_Properties.Build ("style");
begin
   Style_Properties.Set_Property(Renderer, Style_Property,
Pango_Style_Italic);

Manuel






More information about the gtkada mailing list