HI_GetSelEF
%HI_GetSelEF function
Function
The function %HI_GetBSelEF retrieves a beginning position of current selection in the windows control Text entry field.
The function %HI_GetESelEF retrieves an end position of current selection in the windows control Text entry field.
Declaration
%HI_GetBSelEF(
INT in refEntryField
)
%HI_GetESelEF(
INT in refEntryField
)Parameters
refEntryField | Reference to Entry field (reference variable). |
Description
The position represents the sequential number of some character (=> starts from 1) and the bound of selection that is detected is after it.
For example, if the value of %HI_GetBSelEF = 1 and the value of %HI_GetESelEF = 2, the selection contains the first character.
The shift of cursor at the end may be done as follows:
Example
INT _length
; character count in the windows control
_length := %LenStr(%HI_GetText(_refEntryField))
; a cursor is placed after the last character
_length := _length - 1
%HI_SetSelEF(_refEntryField, _length, _length)