company logo

ControlContext :: insertText - Insert text in text field

The function inserts the text passed in sText at the current position (usually the cursor position) in the control data area. In order to insert the text at a different position, the text position property (textPosition()) might be changed before.

The text should be passed as plain text and should not contain HTML mark up settings when the control is a rich text edit control.

In order to insert formatted text one may use insertHTMLText(), which supports HTML tags in case of rich text edit control.

{ // fragment

  ...

  SetPosition(pos);

  InsertText(data);

  ...

}

Implementation details

ControlContext  :: insertText ( odaba::String &sText )
  • sText - Text string