如何将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"}