VS:InsertProposedClassOrLayerItem/ja

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

クラス項目またはレイヤ項目を、クラス、デザインレイヤ、またはシートレイヤのプルダウンメニューの任意の場所に挿入します。廃止予定の関数です。代わりに InsertPropClassOrLayerItem を使用してください。

FUNCTION InsertProposedClassOrLayerItem(
nDialogID :LONGINT;
nComponentID :LONGINT;
strLabel :STRING;
nIconIndex :INTEGER) : BOOLEAN;
def vs.InsertProposedClassOrLayerItem(nDialogID, nComponentID, strLabel, nIconIndex):
    return BOOLEAN

Parameters

nDialogID LONGINT
nComponentID LONGINT
strLabel STRING
nIconIndex INTEGER

Example

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
   boo     :BOOLEAN;
   choiceNumber :INTEGER;
   choiceString :STRING;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            boo := InsertProposedClassOrLayerItem(dialog1, 4, 'New Class Name', 0);
         END;
      1:
         BEGIN
            GetSelChoice(4, 0, choiceNumber, choiceString);
            AlrtDialog(Concat('choiceString: ', choiceString));
         END;
   END;
END;

BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   CreateClassPullDownMenu(dialog1, 4, 24);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

Version

InsertProposedClassOrLayerItem 廃止バージョン: Vectorworks 2012


利用可能バージョン: VectorWorks 2008