@Justin_Chilton / @txnelson / @thomasz
I have a follow up question, wondering if any of you could think of a way to do this. I am trying to generate the matrix of selectable boxes within a Panel Box. Here is the script, I have, wondering if you could guide as to why I am failing ?
InputsLoadBasic =
Expr(
LB1 = Lineup Box( N Col( 2 ) );
LB1 << Append(Panel Box( "Test",
V List Box(
V List Box(
Text Box( "Arg1" ),
NEB_arg1 = Number Edit Box( 2 ),
Text Box( "Arg2" ),
NEB_arg2 = Number Edit Box( 3 ),
)
)
)
);
LB1 << Append(Panel Box( "Selectable Matrix Test",
V List Box(
Button Box("Enter Target Matrix",
nR = 12;
nC = 24;
SCB1 = String Col Box( "", {} );
For( i = 1, i <= nR, i++,
SCB1 << Add Element( Char( i ) )
);
TB1 = Table Box( SCB1 );
For( i = 1, i <= nC, i++,
Insert Into( TB1, Check Box( Repeat( {" "}, nR ), <<Set Heading( Char( i ) ) ) )
);
// initialize the result
ResMat = {};
// loop through each row
For( i = 1, i <= nR, i++,
ResMat[i] = {};
// loop through each column getting values
For( r = 1, r <= nC, r++,
ResMat[i][r] = TB1[CheckBoxBox( r )] << get( i )
);
);
// convert the list to a 2-d matrix
ResMat = Matrix( ResMat );
)
)
)
);
);
InputsLoadBasic;
InputsUnloadBasic =
Expr(
V List Box(
Align( center ),
LB1,
H List Box(
Button Box( "OK",
// Unload PV Prediction Details
arg1 = NEB_arg1 << Get;
arg2 = NEB_arg2 << Get;
ResultMatrix = Matrix( ResMat );
)// end of button box
)// end of H List Box
)// end of V List Box
);
NW1 = New Window("TestUI",
V List Box(
InputsLoadBasic;
InputsUnloadBasic;
)
);
The resulting UI looks like what I want, however, when I click on the "Enter Target Matrix" button shown above, it does not do what I want. Can you please help
Best
Uday