API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ITEXTCTL_SETCURSORPOS()

Brew Release
Brew MP 1.0.2
See Also
ITextCtl ITEXTCTL_GetCursorPos
Description
This function is used to set the position of a cursor in a text control object. You can use the following defines for nOffset to place the text at the start or end.
Params
pITextCtl
[]:
pointer to the ITextCtl interface object
nOffset
[]:
placement of the text object, where TC_CURSOREND places the cursor at the end of the text and TC_CURSORSTART places the cursor at the beginning of the text.
Interface
  • ITEXTCTL
Prototype
  •     void ITEXTCTL_SetCursorPos(ITextCtl * pITextCtl, int32 nOffset);
    
Return
  • None
Side Effect
  • None.
Comments
If nOffset is < 0 the cursor is placed at the beginning of the text. If nOffset is > the Length of the text, the cursor is placed at the end of the text. If you set the character position between an element of a grapheme, the position will be updated such that it is in the next available character position after the complete grapheme. This means that a subsequent call to ITEXTCTL_GetCursorPos() will not necessarily match the value passed to this function. A grapheme is all the characters that compose a complete symbol in a language such as Thai.