Re: How to set the font's size of the Gtklabel

But I only use gtk api, not gtkmm. How to do this by gtk?

On Thu, Aug 28, 2008 at 9:50 PM, Garth's KidStuff
<garthskidstuff gmail com>wrote:

Whops, hit the send button before I was finished..

the method should be:

void ChangeLabelFontSize(
   Gtk::Label *pLabel,   // [in] Pointer to label to change font on
   float scale)  // [in] amount to scale font size by.  1.0 leaves label
       Glib::RefPtr<Pango::Context> pPangoContext =
       Pango::FontDescription fontD =
       fontD.set_size((int)(scale * fontD.get_size()));

Garth Upshaw
Garth's KidStuff
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]