VS:CreatePullDownMenu/ja

From Vectorworks Developer
Jump to: navigation, search

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


Description

プルダウンメニューを作成します。
PROCEDURE CreatePullDownMenu(
dialogID  :LONGINT;
itemID  :LONGINT;
widthInCharacters  :LONGINT);
def vs.CreatePullDownMenu(dialogID, itemID, widthInCharacters):
    return None

Parameters

dialogID LONGINT ダイアログ番号
itemID LONGINT アイテム番号
widthInCharacters LONGINT 幅(文字数指定)

Example

PROCEDURE dialog1_Main;
CONST
	kOK         = 1;
	kCancel     = 2;
	kClassPopUp = 4;
VAR
	dialog1        :INTEGER;
	gClassPopUpInt :INTEGER;
	gClassPopUpStr :STRING;
	cnt            :INTEGER;

PROCEDURE dialog1_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
	CASE item OF
		SetupDialogC:
			BEGIN
				FOR cnt := 1 TO ClassNum DO InsertChoice(kClassPopUp, NumChoices(kClassPopUp), ClassList(cnt));
			END;
		kOK:
			BEGIN
				GetSelChoice(kClassPopUp, 0, gClassPopUpInt, gClassPopUpStr);
			END;
	END;
END;

BEGIN
	dialog1 := CreateLayout('Untitled Dialog', TRUE, 'OK', 'Cancel');
	CreatePulldownMenu        (dialog1, kClassPopUp,  16);
	SetFirstLayoutItem(dialog1, kClassPopUp);

	SetHelpString(kOK,          'Accepts dialog data.');
	SetHelpString(kCancel,      'Cancels operation without changes.');
	SetHelpString(kClassPopUp,  'A pulldown menu control.');
	IF RunLayoutDialog(dialog1, dialog1_Handler) = 1 THEN BEGIN
		AlrtDialog(Concat('Class selected: ', gClassPopUpStr));
	END ELSE BEGIN
		AlrtDialog('User cancelled');
	END;
END;
RUN(dialog1_Main);

Version

利用可能バージョン: VectorWorks9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox
In other languages