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

AVEVA™ Plant SCADA

FormListSelectText

  • Last UpdatedJul 18, 2023
  • 1 minute read

Selects (highlights) a text entry in a Combo box or a List box while the form is displayed. The text to be selected needs to exist in the list. (Use the FormListAddText() function to add a text entry to a list.) Call this function only when the form is displayed, for example, from a field callback function.

Syntax

FormListSelectText(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.

Text:

The text to be selected. If this text is not present in the list, then no item will be selected (and this text will not be added).

Return Value

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

FormListAddText, FormSetText, FormNew

Example

/* Create a form with a list */
hForm = FormNew("Ingredients", 40, 10, 1);
hField = FormListBox(2,2,20,5,sBuf);
FormAddList("Flour");
FormAddList("Water");
FormAddList("Salt");
FormAddList("Sugar");
/* Display the form */
FormRead(1);
..
/*Select Flour */
FormListSelectText(hForm, hField, "Flour");

See Also

Form Functions

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