array 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

// Create a label
$label = new GtkLabel('Example Label');

// Make the label selectable.

// Select a region.
$label->select_region(3, 7);

// Dump out the selection bounds.

See also: select_region()