public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* Setting th font of a label ?
@ 2001-05-09  0:07 Claus Brunzema
  0 siblings, 0 replies; only message in thread
From: Claus Brunzema @ 2001-05-09  0:07 UTC (permalink / raw)
  To: guile-gtk

Hello !

I want to change the font of a gtk-label. If I coded in C I would do
the following:

    GtkWidget *label;
    GtkStyle *style;
    
    label = gtk_label_new ("Blargl 111MMM111");

    style = gtk_style_new ();
    gdk_font_unref (style->font);
    style->font = gdk_font_load ("fixed");
    gtk_widget_set_style (label, style);

How can I do that with guile-gtk ? I looked in gtk-1.2.defs, I found
stuff to get a style from a widget, but in the style no font is
mentioned. It seems like I can load (gdk-font-load) and select a font
with a dialog, but what can I do with that font ?? Ok, I can draw
strings with (gdk-draw-string), but I need the font on a label...

I tried guile-gtk pre0.21 with guile 1.3.4

Thanks in advance
chb

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-09  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-09  0:07 Setting th font of a label ? Claus Brunzema

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).