VS:AlertQuestion

From Vectorworks Developer
Jump to: navigation, search

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

Description

Displays an alert dialog which alerts the user to a condition or situation that requires the user's decision and input before preceding; such as an impending action with potentially destructive or irreversible consequences. The message can be in the form of a question.
FUNCTION AlertQuestion(
question  :STRING;
advice  :STRING;
defaultButton  :INTEGER;
OKOverrideText  :STRING;
CancelOverrideText  :STRING;
customButtonAText  :STRING;
customButtonBText  :STRING) : INTEGER;
def vs.AlertQuestion(question, advice, defaultButton, OKOverrideText, CancelOverrideText, customButtonAText, customButtonBText):
    return INTEGER

Parameters

question STRING The question to display
advice STRING The text to be added in a smaller font under the main information/message
defaultButton INTEGER Specifies which button is to be made the default
OKOverrideText STRING Specifies a string to use in overriding the 'OK' string
CancelOverrideText STRING Specifies a string to use in overriding the 'Cancel' string
customButtonAText STRING Specifies a string to use for an optional custom button A
customButtonBText STRING Specifies a string to use for a second optional custom button B

Return Value

Return Values

0: the negative(Cancel) button was hit 1: the positive(Ok) button was hit 2: custom button A was hit 3: custom button B was hit

Remarks

Examples of all of the messaging techniques:<pre>

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

Example

VectorScript

PROCEDURE Example;
BEGIN
AlrtDialog('AlrtDialog');
AlertInform('AlertInform', 'advice', FALSE);
AlertCritical('AlertCritical', 'advice');
Message(YNDialog('YNDialog'));
Message(AlertQuestion('question', 'advice', 1, 'ok', 'cancel', 'a', 'b'));
END;
RUN(Example);

Python

def Example():
	vs.AlrtDialog('AlrtDialog')
	vs.AlertInform('AlertInform', 'advice', False)
	vs.AlertCritical('AlertCritical', 'advice')	
	vs.Message(vs.YNDialog('YNDialog'))
	vs.Message(vs.AlertQuestion('question', 'advice', 1, 'ok', 'cancel', 'a', 'b'))
Example()

Version

Availability: from VectorWorks12.0

See Also

VS Functions:

VS:AlertInform | VS:AlertCritical

VS Functions:

[[VS:AlertInform]]

| [[VS:AlertCritical]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox