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/pttextsetselection.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/pttextsetselection.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/pttextsetselection.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/pttextsetselection.html on line 8

PtTextSetSelection()

Set the selected range for a PtText widget

Synopsis:

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

Description:

This function sets the selected range for a PtText. When the function completes successfully, start and end contain the range actually selected (start < end). These values may differ from the original values you specified if:

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

This function causes a nondestructive deselect of the currently selected range, if there is one.

Here's how a selected range behaves:

Returns:

The number of characters successfully selected (which may be 0 if *start equals *end or if *start and *end are both greater than the number of characters in the widget), 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, PtTextGetSelection()


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/pttextsetselection.html on line 128

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/pttextsetselection.html on line 128