VS:YNDialog: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
mNo edit summary
Line 55: Line 55:
==== Python ====
==== Python ====
<code lang="py">
<code lang="py">
 
def example():
string = 'User prompt string'
result = vs.YNDialog(string)
example()
</code>
</code>
</sample>
</sample>

Revision as of 17:46, 6 October 2015

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

Description

Function YNDialog displays a dialog box which requests the user to select a Yes or No value. If the user selects the Yes button in the dialog box, the value returned by YNDialog is TRUE; if the user selects No, the function returns FALSE.

FUNCTION YNDialog(
s :STRING) : BOOLEAN;
def vs.YNDialog(s):
    return BOOLEAN

Parameters

s STRING Dialog user prompt string.

Remarks

YNDialog uses the exclamation icon, when really it should use the question icon.

Example

VectorScript

PROCEDURE Example;

VAR
	result :BOOLEAN;

BEGIN

	result := YNDialog( 'Continue?' );

END;

RUN(Example);

Python

def example():
	string = 'User prompt string'
	result = vs.YNDialog(string)
example()

Version

Availability: from All Versions