限制列列錶框條目我對 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);