Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 8

PtTextGetSelection()

Get the selected range from a PtText widget

Synopsis:

int PtTextGetSelection( PtWidget_t *widget,
                        int *start,
                        int *end );

Description:

This function gets the currently selected range from a PtText widget. It returns the number of characters currently selected and sets the provided integers to the actual range. All characters from start up to but not including end are currently selected.

Both start and end are 0-based. So, for example, if start returns as 0, it indicates the first character in the widget's text buffer.

Returns:

The number of characters currently selected, or -1 if the specified widget isn't a PtText widget.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtText, PtTextSetSelection()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 91

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextgetselection.html on line 91