PHP-GTK
Monday, November 24, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::set_label
GtkLabel::set_markupnext

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

GtkLabel::set_line_wrap

Toggles line wrapping within the GtkLabel widget. true makes it break lines if text exceeds the widget's size. false lets the text get cut off by the edge of the widget if it exceeds the widget size.

Example 86. Allowing GtkLabel Text to Wrap Lines

<?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 with a long line of text.
$label = new GtkLabel('This long line of text will wrap onto three lines.');
 
// Set the label's size.
$label->set_size_request(100, 100);
 
// Allow the label to wrap.
$label->set_line_wrap(true);
 
// 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.

See also: get_line_wrap()


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


previousGtkLabel::set_label
GtkLabel::set_markupnext

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