[gtkada] Different font sizes GtkAda Win32
Srinivasan, Rajagopalan (IndSys, SalemVA)
Rajagopalan.Srinivasan at indsys.ge.com
Tue Dec 5 15:54:27 CET 2000
thanks, it works..
> -----Original Message-----
> From: Emmanuel Briot [mailto:briot at gnat.com]
> Sent: Tuesday, December 05, 2000 4:12 AM
> To: gtkada at gtkada.eu.org
> Subject: Re: [gtkada] Different font sizes GtkAda Win32
>
>
> > Is there any inherent problem with attempting to use a
> different font size
> > for some parts of an application ? For example, I have a
> dialog which has
> > several different "Gtk_Label"s. I attempted to change the
> font size using
> > the scheme :
> >
> > - get the style of the dialog
> > - load a new font with a different size
> > - modify the style with this new font
> > - widget.push the above style
> > - create a label
> > - widget.pop_style
>
>
> You have to modify a *copy* of the style.
> For efficiency reasons, the styles are shared between all
> widgets, so you need
> to:
>
> declare
> New_Style : Gtk_Style;
> begin
> Copy (New_Style, Get_Style (Dialog));
> modify style with the new font
> Gtk.Widget.Set_Style (Dialog, New_Style);
> end;
>
> Emmanuel
>
> _______________________________________________
> gtkada mailing list
> gtkada at gtkada.eu.org
> http://gtkada.eu.org/mailman/listinfo/gtkada
>
More information about the gtkada
mailing list