2013-07-21 49 views
0

我想通過代碼創建一組字段。如何向組添加字段?

create group 
set the name of it to "myGroup" 

create field 
set the name of it to "myField" 
set the top of field "myField" to 10 
set the width of field "myField" to 100 
set the left of field "myField" to 20 

-- add myField to myGroup 
-- ?? 

set the backgroundBehavior of group "myGroup" to true 

問題

  • 如何添加字段 「MyField的」 之類的 「爲myGroup」?
  • 如何將該羣組添加到當前卡?
  • 如何測試卡片是否包含組「myGroup」?

回答

5

要字段添加到組:

create field "myField" in group "thisGroup" 

然後就可以正常設置的其他屬性。您也可以單獨設置名稱,但將它包含在「創建」命令中很方便。

到現有組添加到當前卡:

place group "myGroup" onto this card 

可以替代「此卡」的卡片參考。請注意,新創建的任何組都會自動放置在當前卡上。 「place」命令僅用於顯示當前另一張卡上的組。

要查看某個組是目前卡上:

get there is a group "myGroup" of this card 

可以替代「此卡」的卡片參考。