VS:SelChoice

From Vectorworks Developer
Jump to: navigation, search

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

Description

Procedure SelChoice makes a specified list value the selected value for the choice item. To make no item selected, supply -1 as the choice parameter.
PROCEDURE SelChoice(
item  :INTEGER;
choice  :INTEGER;
select  :BOOLEAN);
def vs.SelChoice(item, choice, select):
    return None

Parameters

item INTEGER Item ID of dialog control.
choice INTEGER Position (0-based) in list of item to be set as selected.
select BOOLEAN Selection status of list item.

Remarks

Note: deprecated from VW 15+, use SelectChoice.

Make a current combo box value the selected value for that combo box.

Example

VectorScript

PROCEDURE Example;
VAR
dialog1 :INTEGER;
result  :INTEGER;
PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
IF item = SetUpDialogC THEN BEGIN
InsertChoice(4, 0, 'One');
InsertChoice(4, 1, 'Two');
InsertChoice(4, 2, 'Three');
SelChoice(4, 1, TRUE);
END;
END;
BEGIN
dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', '');
CreatePullDownMenu(dialog1, 4, 16);
SetFirstLayoutItem(dialog1, 4);
result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

Python


Version

Availability: from VectorWorks 8.0. Deprecated from VW 15+.
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox