Re: font size gtk_*_new_with_label
- From: "Rui Tiago Cação Matos" <tiagomatos gmail com>
- To: ariel_xxii yahoo com ar
- Cc: gtk-devel-list gnome org
- Subject: Re: font size gtk_*_new_with_label
- Date: Sat, 12 Jul 2008 13:05:34 +0100
On 12/07/2008, Luis Ariel Lecca <ariel_xxii yahoo com ar> wrote:
> So how to get the reference pointer or directly how to change the font size on these objects ?
Since GtkButtons are GtkContainers you could add a custom label to it like this:
#include <gtk/gtk.h>
int
main (int argc, char **argv)
{
GtkWidget *label, *button, *window;
gtk_init (&argc, &argv);
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label),
"<span font_desc=\"Times Italic 24\">Label</span>");
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), label);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}
Good luck,
Rui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]