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
Set the selected range for a PtText widget
int PtTextSetSelection( PtWidget_t *widget,
int *start,
int *end );
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:
- The start value you specified was
greater than end.
Or:
- The range you specified exceeded the bounds of the widget's
text.
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:
- If you move the text cursor (via arrow keys or a
mouse click), the range is deselected nondestructively.
- If you perform an action that would modify the
widget's text in any way, the range is deleted and
replaced by your input. If that input is
Del or a delete backspace
(DBS on many keyboards), the range
is simply deleted.
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.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
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