限制列列表框条目我对 Col List Box 有疑问。 我想限制可供选择的列列表。
我已经将它限制为数字和连续,但在我的应用程序中留下了很长的列表。
就此而言,如果有另一种更简单的方法(列对话框?),那也很好。 文档似乎仅限于此。 例如,它显示可以将脚本添加到 Col List Box() 函数,但没有示例或描述如何完成。
使用脚本索引中的修改示例,例如,我将如何删除所有以 N 开头的列名?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
New Window( "Col List Box Example 3",
H List Box(
ll1 = Col List Box( all,
<< Set Data Type( "Numeric" ),
<< Set Analysis Type( "Continuous" )),
Button Box( "Add", ll2 << append( ll1 << get selected ) ),
ll2 = Col List Box( "numeric", MaxItems( 1 ), nlines( 1 ) ),
Button Box( "Remove", ll2 << remove selected )
)
);
回复:限制 Col 列表框条目这也将工作。 我知道过滤,但没想过编写脚本。回复:限制 Col 列表框条目这不完全是我的想法,但它有效!回复:限制 Col 列表框条目检查过滤器列选择器()。
Names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
new window("Test",
fcs = filter col selector(dt)
);
它为您提供了很多减少的选择。
回复:限制 Col 列表框条目@mwechtal ,
这样的事情怎么样?
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
ColumnNames = dt << Get Column Names("String");
for(i = N Items(ColumnNames), i >= 1 , i--,
If(!IsMissing(Regex(Char(ColumnNames[i]),"PNP*")),
Remove From(ColumnNames,i);
);
);
ColumnNames;
New Window( "Example", b = Button Box( "Popup Menu", Print( b << Get Menu Choice ) ) );
b << set menu items(ColumnNames);