Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

FormSetText

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets new field text on a field. This function allows you to change field text while the form is displayed. Call this function only when the form is displayed, for example, from a field callback function.

If you are using this function on a Combo box or a List box, it will select the text from the Combo box or List box list. If no text exists in the Combo box or List box list, the function will add it.

Syntax

FormSetText(hForm, hField, Text)

hForm:

The form handle, returned from the FormNew() function. The form handle identifies the table where all data on the associated form is stored.

hField:

The field handle of the field currently selected. If the hField is a handle to the secure edit field created with FormSecurePassword, the text in the secure edit field will not be changed. However, when an empty string is passed to FormSetText(), the contents of the secure edit field will be cleared.

Text:

New field text.

Return Value

0 (zero) if successful, otherwise an error is returned.

FormCurr, FormListSelectText, FormListAddText, FormNew, FormSecurePassword, FormSetText

Example

/* Create a form with a field */
hForm = FormNew("Ingredients", 40, 10, 1);
hField = FormPrompt(2,2,"Motor1:");
/* Display the form*/
FormRead(1);
..
/* Change the text in the field */
FormSetText(hForm, hField, "Pump1:");
..

See Also

Form Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in