PHP-GTK
Saturday, November 01, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel
GtkLabel::getnext

Last updated: Sun, 12 May 2013
view this page in English

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

<?php
function rotate($label) {
    $label->set_label(
        $label->get_angle()
        . ' 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->set_default_size(500,500);
$wnd->set_title('GtkLabel::set_angle');
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));
 
$label = new GtkLabel('t_est', true);
$label->set_use_markup(true);
 
$wnd->add($label);
$wnd->show_all();
 
Gtk::timeout_add(50, 'rotate', $label);
Gtk::main();
?>


User Contributed Notes
gtk.gtklabel.constructor.php
add a note about notes
There are no user contributed notes for this page.


previousGtkLabel
GtkLabel::getnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:59 2013 CEST