Re: [gtkmm] Right aligning GtkEntry? (and more)



Am Don, 2002-10-10 um 20.14 schrieb Benjamin A. Cooper:
> 
> Also, I want to change the font in my GtkEntry and GtkTreeView to be a
> mono spaced font (since I am dealing with numbers and I want them to
> line up). Currently I am simply setting the font family to courier, but
> I would rather it used some sort of user defined "system default" mono
> spaced font, is there such a thing, and how do I access it?  How do I
> allow the user to configure a font in the rc file, then make sure that
> it is indeed monospaced before letting it be used?  How do I determine
> if such a setting has taken place and choose weather to set the font
> myself or not?

That one is easy:

entry->modify_font(Pango::FontDescription("fixed"));

The font aliases "fixed", "sans" and "serif" are guaranteed to be
available on every system.

--Daniel





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