VS:CreateTreeControl/ja

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

ツリーアイテムを作成します。

PROCEDURE CreateTreeControl(
nDialogID :LONGINT;
nComponentID :LONGINT;
nWidthInChars :INTEGER;
nHeightInChars :INTEGER);
def vs.CreateTreeControl(nDialogID, nComponentID, nWidthInChars, nHeightInChars):
    return None

Parameters

nDialogID LONGINT
nComponentID LONGINT
nWidthInChars INTEGER
nHeightInChars INTEGER

Example

PROCEDURE Example;
VAR
   dialog1 :INTEGER;
   result  :INTEGER;
   widthInChars, heightInChars :INTEGER;
   root1, root2, child1, child2 :INTEGER;

PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT);
BEGIN
   CASE item OF
      SetupDialogC:
         BEGIN
            root1 := InsertTreeControlItem(dialog1, 4, 'root1', -1, 0);
            child1 := InsertTreeControlItem(dialog1, 4, 'child1', root1, 0);
            child2 := InsertTreeControlItem(dialog1, 4, 'child2', root1, child1);
            root2 := InsertTreeControlItem(dialog1, 4, 'root2', -1, root1);
            child1 := InsertTreeControlItem(dialog1, 4, 'child1', root2, 0);
            child2 := InsertTreeControlItem(dialog1, 4, 'child2', root2, child1);
         END;
   END;
END;

BEGIN
   dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel');
   widthInChars := 28;
   heightInChars := 8;
   CreateTreeControl(dialog1, 4, widthInChars, heightInChars);
   SetFirstLayoutItem(dialog1, 4);
   result := RunLayoutDialog(dialog1, Dialog_Handler);
END;
RUN(Example);

Version

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

See Also

関連関数:

VS:GetTreeControlSelectedItem | VS:InsertTreeControlItem | VS:RemoveTreeControlItem

関連関数:

[[VS:GetTreeControlSelectedItem]] | [[VS:InsertTreeControlItem]]

| [[VS:RemoveTreeControlItem]]