将列表复制到“App 开发器”中的列表框大家好,
我正在 Application Builder 中构建一个插件,它使用列表框的输入作为查询。 但是,对于大量查询,这很复杂。 我希望能够将列表从表中的行复制到 Application Builder 中的列表框,我该怎么做? 提前致谢。
回复:将列表复制到 Application Builder 中的列表框您还可以将数据从表动态加载到应用程序构建器列表框中。这是一个简单的例子,我有两个列表框,品牌磅和姓名_lb .我正在添加品牌和名称信息糖果棒数据集。
这是布局:

这是脚本部分:
// This script is executed when a new module instance is
// created. The pre-defined object "thisModuleInstance" refers
// to the instance object, but other objects such as boxes and
// scripts have not yet been created. Variables declared here are
// scoped to the ModuleInstance namespace.
// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);
thisModuleInstance << Create Objects;
// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").
dt = open("$sample_data\Candy Bars.jmp");
brand_list = dt:brand << get values;
name_list = dt:name << get values;
brand_lb << set items(brand_list);
name_lb << set items(name_list);
close(dt, nosave);
这是它的样子:

回复:将列表复制到 Application Builder 中的列表框你好,我们又见面了,
如果需要,只需添加一些功能,您可以添加一个按钮来复制 List1 中的所有项目供以后使用(例如用作查询中的过滤器):
Button3Press=Function({this},
// This function is called when the button is pressed
List1items=List1<<GET items=""></GET>
或者,如果您希望允许用户选择要在查询中使用的列表中的项目:
Button4Press=Function({this},
// This function is called when the button is pressed
List1selected=List1<<GET selected=""></GET>
如果有人将他们在给定日期可能需要的所有标签复制到列表中,然后在运行各种查询时从中选择,这可能很有用。
回复:将列表复制到 Application Builder 中的列表框你好,
以下示例说明了如何为此目的使用 JMP App 开发器。还附上了一张表格,其中第一列包含标签。只需选择标签并将其复制到剪贴板,然后使用应用程序中的按钮将它们粘贴到列表框中。查看应用程序中的脚本,了解按钮的工作原理。这有帮助吗?