stringEditor()

You can use the function stringEditor() to edit string variables in, for example, text fields. This means string variables that are not saved in a file.

Synopsis

int stringEditor(string &text, bool readOnly);

Parameters

Parameter Meaning
text The text to be viewed
readOnly Readonly (TRUE) or not (FALSE).

Return value

Returns 0 if the function was executed successfully.

Errors

Wrong or missing parameters.

Description

You can use the function stringEditor() to edit string variables in, for example, text fields. Use the function fileEditor() to edit and view files.

Example

The following example reads the content of a text box into a dyn_string variable. The dyn_string variable is passed to the editor when the editor is called. Therefore, the editor can show the content of the text box immediately in the editor. Afterwards, you can edit the text and the text is saved in the dyn_string variable.

main()
{
  dyn_string textbox = text1.text;
  stringEditor(textbox);
  text1.text = textbox;
}

Assignment

Strings

Availability

UI