PanelBoxのスクリプト作成についてサポートが必要コンボボックスと異なるサイズのコンテンツを持つ2つのIfボックスを備えたVリストボックスを備えたパネルボックスがあります。 コンボボックスの選択に応じて、小さいIfBoxまたは大きいIfBoxのいずれかを表示します。
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 ) )
)
);
コンボボックスを切り替えると、パネルボックスのサイズが変わり、そのパネルボックスの下にあるものがすべてジャンプします。 パネルボックスと同じサイズを維持するにはどうすればよいですか?
高さの設定、自動ストレッチの設定、最小サイズの設定()などを試しました。
スクリプティングRe:パネルボックスのスクリプト作成についてサポートが必要手動で設定するのは少し難しいかもしれませんボタンボックス()サイズ(私は通常、 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 );Re:パネルボックスのスクリプト作成についてサポートが必要使用例を次に示します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>Re:パネルボックスのスクリプト作成についてサポートが必要私はXのサイズについて話している、私はYのサイズについて話している。
あなたの例では、パネルボックスの高さが変化しています。
これ:

対これ:

この下に他のパネルボックスがあります-そしてそれらはジャンプし始めます。
とにかく、今はあきらめてラインナップボックスとして実装しました。