如何將ListBox中的項目更改為數組?我正在使用應用程序生成器。 將此列錶框的名稱視為“ ListAll”。 如何將ListBox項目更改為數組,例如{“ Item1”,“ Item2”}? 目前,我可以看到,此ListBox將返回“ List1”,而不是所需的數組。

第二個問題,如果能夠從此ListBox生成數組,如何將ListPlot數據傳遞給param? 參數應包含{“ Item1”}或{“ Item2”}。
ButtonAddPress=Function({this},
name = this << Get Button Name;
ListPlot << Append(ListAll << Get Selected);
);
ButtonRemovePress=Function({this},
name = this << Get Button Name;
ListPlot << Remove Selected;
);
ButtonRunPress=Function({this},
name = this << Get Button Name;
param = ListPlot;謝謝。
數據表其他腳本編寫回复:如何將列錶框中的項目更改為數組?你好
對於ListBox問題,您可能需要查看MaxSelected參數:我認為默認情況下(如果省略)它僅返回1個選定項。
最好,
TS回复:如何將列錶框中的項目更改為數組?我認為您正在尋找“獲取物品”消息。以下示例可能會有所幫助:
names default to here(1);
nw = new window("test",
lb = list box({"Item1", "Item2"})
);
//Get all items
lb << Get Items;
// Returns: {"Item1", "Item2"}
//Select the first item
lb << Set Selected(1);
//Get selected parameter
lb << Get Selected;
// Returns: {"Item1"}