PHP-GTK
Tuesday, September 02, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::parse_uline
GtkLabel::setnext

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

GtkLabel::select_region

Selects a range of characters in the label, if the label is selectable. If the label is not selectable, this function has no effect. If start_offset or end_offset are -1, then the end of the label will be substituted.

Example 80. Selecting a Region in a GtkLabel

<?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('Example Label');
 
// Make the label selectable.
$label->set_selectable(true);
 
// Select a region ("amp").
$label->select_region(2, 5);
 
// Add the label to the window.
$window->add($label);
 
// Show the window and start the main loop.
$window->show_all();
Gtk::main();
?>
This example produces the following window:

See also: set_selectable() , get_selectable() , get_selection_bounds() ,


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


previousGtkLabel::parse_uline
GtkLabel::setnext

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