Label.setMarkup

Parses @str which is marked up with the [Pango text markup language]PangoMarkupFormat, setting the label’s text and attribute list based on the parse results. If the @str is external data, you may need to escape it with g_markup_escape_text() or g_markup_printf_escaped(): |[<!-- language="C" --> const char *format = "<span style=\"italic\">\%s</span>"; char *markup;

markup = g_markup_printf_escaped (format, str); gtk_label_set_markup (GTK_LABEL (label), markup); g_free (markup); ]|

class Label
void
setMarkup
(
string str
)

Parameters

str string

a markup string (see [Pango markup format]PangoMarkupFormat)

Meta