VS:GetField
Jump to navigation
Jump to search
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Function GetField retrieves the text from a text field. This procedure is called when exiting a custom dialog to retrieve user data.
FUNCTION GetField(
fieldID :INTEGER) : DYNARRAY[] of CHAR;
def vs.GetField(fieldID): return DYNARRAY[] of CHAR
Parameters
fieldID INTEGER Item ID of field from which to retrieve data.
Remarks
Note: deprecated from VW 15+, use GetItemText for STRING values or GetMultilineText for DYNARRAY OF CHAR values.
The example is somewhat incomplete, as written. Only need to show the operation of the VS:GetField call.
Starting with 9.5b5, VS:GetField is supposed to return the string from both editable and static text fields. This has not been fully tested yet.
Example
VectorScript
REPEAT DialogEvent(Item); CASE Item OF {// OK Button //} 1:BEGIN Done:=TRUE; targetValue := GetField(4); replaceValue:= GetField(6); IF ItemSel(9) THEN textMode:=2; IF ItemSel(10) THEN textMode:=4; IF ItemSel(11) THEN textMode:=8;
Python
Version
Availability: from All Versions. Deprecated from VW 15+.