GtkLabel Constructor

GtkLabel ([string string = null [, boolean parse_mnemonic = false]]);

Creates a new label with an (optional) text. If you set the parse_mnemonic to true, the label will set the mnemonic key to the first letter right to the first underscore _.

Example 77. Creating a GtkLabel

function rotate($label) {
        . ' label text - this <b>is</b> a' 
        . '<span foreground="#F00">very long label</span>'
        . 'so we can see <span background="green" size="larger"'
        . ' weight="bold">rotation</span> better'
    $label->set_angle($label->get_angle() + 1);
    return true;

$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));

$label = new GtkLabel('t_est', true);


Gtk::timeout_add(50, 'rotate', $label);