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()