Panel Box 스크립팅에 도움이 필요합니다콤보 상자가 있는 V 목록 상자가 있는 패널 상자와 크기가 다른 내용이 있는 두 개의 If 상자가 있습니다. 콤보 상자 선택에 따라 더 작은 If 상자 또는 더 큰 If 상자를 표시합니다.
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 ) )
)
);
콤보 상자를 전환하면 패널 상자의 크기가 변경되고 해당 패널 상자 아래에 있는 모든 항목이 점프합니다. Panel Box의 크기를 어떻게 유지합니까?
높이 설정, 자동 늘이기 설정, 최소 크기 설정() 등을 시도했습니다.
스크립팅Re: Panel Box 스크립팅에 도움이 필요합니다수동으로 설정하는 것이 약간 어려울 수 있습니다. 버튼박스() 사이즈(저는 보통 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: Panel Box 스크립팅에 도움이 필요합니다다음은 사용 예입니다 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: Panel Box 스크립팅에 도움이 필요합니다나는 X의 크기에 대해 이야기하고 있고 Y의 크기에 대해 이야기하고 있습니다.
귀하의 예에서 패널 상자의 높이가 변경됩니다.
이:

대 이것:

이 상자 아래에 다른 패널 상자가 있으며 점프하기 시작합니다.
어쨌든 포기하고 일단은 Line Up Box로 구현했습니다.