VS:CreateEditTextBox

From Vectorworks Developer
Revision as of 14:25, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Description

Creates a scrolling multiline editable text field in a dialog layout.

PROCEDURE CreateEditTextBox(
dialogID :LONGINT;
itemID :LONGINT;
defaultText :STRING;
widthInCharacters :LONGINT;
heightInLines :LONGINT);
def vs.CreateEditTextBox(dialogID, itemID, defaultText, widthInCharacters, heightInLines):
    return None

Parameters

dialogID LONGINT The id of the dialog
itemID LONGINT The id of the text box control.
defaultText STRING The initial text.
widthInCharacters LONGINT Width of the control in characters
heightInLines LONGINT Height of the control in lines.

Example

VectorScript

PROCEDURE Example;
VAR
dialog1 :INTEGER;
result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
END;
BEGIN
dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
CreateEditTextBox(dialog1, 4, 'default text', 24, 16);
SetFirstLayoutItem(dialog1, 4);
result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

Python

def Dialog_Handler( item , data ):
	pass
def Example():
	dialog1 = vs.CreateLayout('Example Dialog', False, 'OK', 'Cancel')
	vs.CreateEditTextBox(dialog1, 4, 'default text', 24, 16)
	vs.SetFirstLayoutItem(dialog1, 4)
	result = vs.RunLayoutDialog(dialog1, Dialog_Handler)
Example()

Version

Availability: from VectorWorks10.0