PHP-GTK
Friday, August 29, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkLabel::get_selectable
GtkLabel::get_single_line_modenext

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

GtkLabel::get_selection_bounds

Gets the selected range of characters in the label. The first array value is the start character offset, the second the end offset.

So a return array of array(1,2) would mean that 1 character (from position 1 to position 2) is selected.

Example 79. Getting the Selection Bounds of a GtkLabel

<?php
// Create a label
$label = new GtkLabel('Example Label');
 
// Make the label selectable.
$label->set_selectable(true);
 
// Select a region.
$label->select_region(3, 7);
 
// Dump out the selection bounds.
print_r($label->get_selection_bounds());
?>

See also: select_region()


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


previousGtkLabel::get_selectable
GtkLabel::get_single_line_modenext

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