需要有關腳本面板框的幫助我有一個帶有 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>回复:在腳本面板框方面需要幫助我說的是 X 的大小,我說的是 Y 的大小。
在您的示例中,面板框的高度正在變化。
這:

與這個:

我在這個下面還有其他面板框 - 它們開始跳躍。
無論如何,我現在放棄並將其實現為 Line Up Box。