PHP-GTK
Saturday, July 26, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::set_markup_with_mnemonic
GtkLabel::set_mnemonic_widgetnext

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

GtkLabel::set_max_width_chars

Sets the desired maximum width in characters to n_chars chars.

Example 89. Setting the Max Width of a GtkLabel in Characters

<?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('Exampel Label');
 
// Set the max width in characters.
$label->set_max_width_chars(10);
 
// 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. Notice how only the first ten characters or the label are shown.

See also: get_max_width_chars()


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


previousGtkLabel::set_markup_with_mnemonic
GtkLabel::set_mnemonic_widgetnext

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