Skip to content

Latest commit

 

History

History
65 lines (57 loc) · 1.41 KB

File metadata and controls

65 lines (57 loc) · 1.41 KB

CreateCheckBox

Description

Creates a check box control in a dialog layout.

PROCEDURE CreateCheckBox(
				dialogID : LONGINT;
				itemID   : LONGINT;
				text     : STRING);
def vs.CreateCheckBox(dialogID, itemID, text):
    return None

Parameters

Name Type Description
dialogID LONGINT The index of the dialog layout containing the control.
itemID LONGINT The index that will identify the control item.
text STRING The display text for the control.

Examples

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');
CreateCheckBox(dialog1, 4, 'Use layer colors');
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.CreateCheckBox(dialog1, 4, 'Use layer colors')
	vs.SetFirstLayoutItem(dialog1, 4)
	result = vs.RunLayoutDialog(dialog1, Dialog_Handler)
Example()

See Also

VS Functions: SetItem | SetItemEnable | ItemSel

Version

Availability: from VectorWorks9.0

Category