PHP-GTK
Tuesday, July 22, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::set_line_wrap
GtkLabel::set_markup_with_mnemonicnext

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

GtkLabel::set_markup

Parses str which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results.

Example 87. Setting GtkLabel Text with Pango Markup

<?php
// Create a window to hold the label.
$window = new GtkWindow();
 
// Set up the window to close cleanly.
$window->connect_simple('destroy', array('Gtk', 'main_quit'));
 
// Create a label.
$label = new GtkLabel();
 
// Set some text with Pango markup.
$label->set_markup('<span color="red">Example</span> Label');
 
// Add the label to the window.
$window->add($label);
 
// Show the window and start the main loop.
$window->show_all();
Gtk::main();
?>
This code will produce the window shown below.


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


previousGtkLabel::set_line_wrap
GtkLabel::set_markup_with_mnemonicnext

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