steveo225 steveo225 - 1 year ago 127
C Question

Make a label bold in GTK+

I am simply trying to make the text bold in a

. All I can find are examples for Python and C#. Here is how I currently set up
s, but I don't know how to make them render the text in bold.

GtkWidget* label = gtk_label_new("Text I want to be bold");

Answer Source

A simple way is to call gtk_label_set_markup(), which accepts a string of Pango markup:

GtkWidget *label = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(label), "<b>Text to be bold</b>");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download