VS:IntDialog: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(No difference)

Latest revision as of 14:34, 12 August 2013

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Function IntDialog displays a dialog box which requests the user to enter an integer value.

IntDialog automatically screens for valid numeric input.

FUNCTION IntDialog(
request :STRING;
default :STRING) : INTEGER;
def vs.IntDialog(request, default):
    return INTEGER

Parameters

request STRING Dialog user prompt string.
default STRING Default value for input field.

Example

VectorScript

PROCEDURE Example;
VAR
i : INTEGER;
BEGIN
i := IntDialog('Enter an integer:', '0');
IF NOT DidCancel THEN BEGIN
i := i*3;
Message(i);
END;
END;
RUN(Example);

Python

def Example():
	i = vs.IntDialog('Enter an integer:', '0');
	if not vs.DidCancel():
		i = i*3
		vs.Message(i)
Example()

Version

Availability: from All Versions