需要有关脚本面板框的帮助我有一个带有 V 列表框的面板框,它有组合框和两个内容不同大小的 If 框。 根据组合框的选择,我会显示较小的 If Box 或 Bigger If Box。
notReadyTablesText = "Need to join tables";
readyTableText = "I have the table";
selectorOptions = Eval List( {notReadyTablesText, readyTableText} );
Panel Box( "Select tables",
stVLB = V List Box(
readyTablesSelector = Combo Box(
selectorOptions,
selector = readyTablesSelector << Get Selected();
Show( selector );
If(
selector == notReadyTablesText,
notReadyTables << Set( 1 );
readyTables << Set( 0 );,
selector == readyTableText,
notReadyTables << Set( 0 );
readyTables << Set( 1 );
)
;
),
notReadyTables = If Box(
1,
V List Box(
Button Box( "Table 1", t1Open ),
Button Box( "Table 2", t2Open ),
join = Button Box( "Join Tables",
notImplemented;
)
)
),
readyTables = If Box( 0, Button Box( "Load Tables", loadTable ) )
)
);
当我切换组合框时,面板框的大小会发生变化,并且该面板框下方的所有内容都在跳跃。 如何保持面板框的大小相同?
我尝试了设置高度、设置自动拉伸、设置最小尺寸()等。
脚本回复:在脚本面板框方面需要帮助手动设置可能有点困难按钮框()尺寸(我通常使用H 分线盒()和阵容盒()让 JMP 自动调整所有内容),但我发现最好的方法是发送消息<<设置最小尺寸(宽度,25)<<设置最大尺寸(宽度,25) .
notReadyTablesText = "Need to join tables";
readyTableText = "I have the table";
selectorOptions = Eval List( {notReadyTablesText, readyTableText} );
pb = Panel Box( "Select tables",
stVLB = V List Box(
readyTablesSelector = Combo Box(
selectorOptions,
selector = readyTablesSelector << Get Selected();
Show( selector );
If(
selector == notReadyTablesText,
notReadyTables << Set( 1 );
readyTables << Set( 0 );,
selector == readyTableText,
notReadyTables << Set( 0 );
readyTables << Set( 1 );
)
;
),
notReadyTables = If Box(
1,
V List Box(
bb1 = Button Box( "Table 1", t1Open ),
bb2 = Button Box( "Table 2", t2Open ),
join = Button Box( "Join Tables",
notImplemented;
)
)
),
readyTables = If Box( 1, bb3 = Button Box( "Load Tables (really long button name)", loadTable ) )
)
);
new window( "test",
pb
);
boxes = {bb1, bb2, bb3, join};
max size = Max( {readytables, notReadyTables} << Get Width );
boxes << Set Min Size( max size, 25 ) << set Max Size( max size, 25 );
readyTables << Set( 0 );回复:在脚本面板框方面需要帮助这是一个使用示例H 分线盒()和阵容盒()去做这个。请注意,如果同时从此脚本打开多个窗口,这还将所有内容都限定在匿名命名空间中,以防止串扰。
Names Default to Here( 1 );
self = New Namespace();
self:notReadyTablesText = "Need to join tables";
self:readyTableText = "I have the table";
self:selectorOptions = Eval List( {self:notReadyTablesText, self:readyTableText} );
Eval( Eval Expr(
self:button generator = Function( {title, callback},
{Default Local},
self = Namespace( Expr( self << Get Name ) );
Eval( Parse( Eval Insert( JSL Quote(
box = Button Box( title, <<SET function=""></SET>