[gtkada] Setting text weight in Cell_Renderer_Text
Duncan Sands
baldrick at free.fr
Thu Oct 9 16:13:56 CEST 2003
Thanks Manuel, that is very helpful.
All the best,
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);
More information about the gtkada
mailing list