Hi,
I am working on creating an event handler function that will switch to the histogram tab and scroll to the process distribution when a row in the process table within the summary tab is selected.
For example, if I click on “PNP4” in the table, the function should automatically switch to the histogram tab and scroll to the specific location displaying that process distribution. Any suggestions?
Here is the jsl code:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
col_names = dt << get column group( "Processes" );
tab = dt << Tabulate( Add Table( Column Table( Statistics( Mean, Std Dev ) ), Row Table( Analysis Columns( Eval( col_names ) ) ) ) );
dt2 = tab << Make Into Data Table;
tab << close window;
nw = New Window( "",
<<Type( "Dialog" ),
<<onclose(
rs = 0;
1;
),
Panel Box( ,
tabbb= Tab Box(
"Summary",
V Scroll Box(
tbbox = Table Box(
String Col Box( "Tests", (dt2:Analysis Columns << get values) ),
Number Col Box( "Mean", (dt2:Mean << get values) ),
Number Col Box( "Std Dev", (dt2:Std Dev << get values) ),
)
),
"Histogram",
vsb = V Scroll Box(
V List Box(
For Each( {col, idx}, col_names,
dt << distribution(
Stack( 1 ),
Continuous Distribution(
Column( col_names[idx] ),
Horizontal Layout( 1 ),
Normal Quantile Plot( 1 ),
Customize Summary Statistics(
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 )
),
Vertical( 1 ),
Process Capability( 0 )
)
)
)
)
)
)
)
);
Close( dt2, nosave );
tabboxxpath = nw << XPath("//TabPageBox[text()='Summary']//TableBox");
tabboxxpath << Set Selectable Rows( 1 );
fun = Function( {a},
tabbb << set selected ( 2 );
vsb << Set Scroll Position( 0, 200 );
);
rs = tbbox << make row state handler( fun );