how to set the font in a menu item
- From: erik netscape com (Erik van der Poel)
- To: gtk-list redhat com
- Subject: how to set the font in a menu item
- Date: Tue, 08 Jun 1999 17:02:35 -0700
Hello,
I'm trying to programmatically set the font of a menu item. I tried the
following code:
gtk_widget_ensure_style(mMenuItem);
GtkStyle* style = gtk_style_copy(mMenuItem->style);
gdk_font_unref (style->font);
GdkFont* font = gdk_font_load("fixed");
style->font = font;
gdk_font_ref(style->font);
gtk_widget_set_style(mMenuItem, style);
gtk_style_unref(style);
But it doesn't work.
I also tried using an "RC" file, and that *does* work. Is there no way
to set the font programmatically? If there is a way, what is it?
Thanks,
Erik van der Poel
Netscape
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]