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| Name | Type | Description |
|---|---|---|
| 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. |
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);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()CreateLB (IDLabelDialog, kDataBox, 53, 20);
CreateStaticText (IDLabelDialog, kName, GetStr(kName), -1);
CreateStaticText (IDLabelDialog, kFieldName, GetStr(kFieldName), 28);
CreateStaticText (IDLabelDialog, kFieldValueTxt, GetStr(kFieldValueTxt), -1);
CreateEditTextBox (IDLabelDialog, kFieldValue, GetStr(kFieldValue), 28, 3);
CreateEditText (dialog1, 71, GetStr(71), 16);
CreateStaticText (dialog1, 72, GetStr(72), -1);
CreateEditText (dialog1, 73, GetStr(73), 16);
CreateStaticText (dialog1, 74, GetStr(74), -1);
CreateEditTextBox (dialog1, 75, GetStr(75), 30, 5);
CreateRadioButton (dialog1, 76, GetStr(76));
CreateRadioButton (dialog1, 77, GetStr(77));
CreateStaticText (dialog1, 78, ' ', -1);
BEGIN
CreateEditTextBox (dialogID, fieldNum, '',kFieldWidth, 4);
fieldName := Copy (fieldName, 1, Len (fieldName) - 1);
ENDimport vs
# Creates a scrolling multiline editable text field in a dialog layout.
dialogID = 1
itemID = 2
defaultText = 'Example text'
widthInCharacters = 3
heightInLines = 10
vs.CreateEditTextBox(dialogID, itemID, defaultText, widthInCharacters, heightInLines)
newObj = vs.LNewObj() # handle to the newly created objectAvailability: from VectorWorks10.0