PHP-GTK
Saturday, July 04, 2009 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::set_markup
GtkLabel::set_max_width_charsnext

Last updated: Sat, 04 Jul 2009
view this page in English | Bulgarian | Japanese | Brazilian | Simplified Chinese

GtkLabel::set_markup_with_mnemonic

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. If characters in str are preceded by an underscore (_), they are underlined indicating that they represent a keyboard accelerator called a mnemonic.

Example 85. Setting GtkLabel Text with Pango Markup and a Mnemonic

<?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_with_mnemonic('<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.

The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using set_mnemonic_widget() .


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


previousGtkLabel::set_markup
GtkLabel::set_max_width_charsnext

Last updated: Sat, 04 Jul 2009
view this page in English | Bulgarian | Japanese | Brazilian | Simplified Chinese


credits 

PHP  Copyright © 2001-2009 The PHP Group
 All rights reserved.
Last updated: Sat Jul 4 01:52:26 2009 UTC