Field-Map Scripting

4.1.1.2.2 InputIntegerWithCounter

InputIntegerWithCounter function


Prototype:

function InputIntegerWithCounter (const caption, msg: string;

                                 const Min, Max, Increment: integer;

                                 const PresetValue: variant) : variant

Description:

This function displays a dialog allowing the user to input integer by typing its value in or using up and down arrows. The dialog has a caption specified by the caption parameter, contains the text specified by the msg parameter and  "OK" and "Cancel" buttons.

Syntax:

variable := InputIntegerWithCounter (Caption, Msg, Min, Max, Increment, PresetValue);


Part

Description


variable

A variable declared as variant


Caption

A string parameter which specifies the caption of the dialog box.


Msg

A string parameter which specifies the message displayed in the dialog box.


Min

Lower threshold of the value in input


Max

Upper threshold of the value in input


Increment

Size of the counter step


PresetValue

Starting value




Return value:

An integer variable if the user has entered a valid integer number and confirmed it by the "OK" button or a null if the user has pressed the "Cancel" button


Example:


Var number : variant;

Begin
  number := InputIntegerWithCounter('Distance from the tree', 'Enter distance from the tree', 5, 80, 5, 20);
End.


See also:

InputInteger; InputIntegerWithCounter; InputFloat; InputString; InputText; InputOption; InputOptionWithStartingValue; InputFromList;InputFromListWithStartingValue; InputFromCheckListTab; InputFromListTab