Hi All,
I want to generate an overlay plot using my script. The plot is overlaid by the “Device_Type” column in my data table. However, I would like to let the user choose which device type they want to include in the overlay plot. Therefore, I want to create a list of checkboxes in the user interface. Here is my code:
Close All( Data Tables, NoSave );//close all previous windows
dt1 = Open("data_device.jmp");
//extract a list of unique device types
Summarize( dt1, byDevice = by( :Device_Type ) );
//user interface
stop_flag = 0;
win = New Window("user interface",
<<Modal,
<<ReturnResult,
V List Box(
Text Box ("Create an overlay plot"),
p3_box = H List Box(),
db = {},
For (i=1, i<= N items(byDevice),i++,
db[i] = checkbox((byDevice[i]));
p3_box << Append(db[i]);
),
H List Box(
Button Box("OK",
For (i=1, i<= N items(byDevice),i++,
db_gen [i] = db[i] << Get(i);
),
),
Button Box("Cancel",
stop_flag = 1;
),
),
),
);
The checkboxes can be created successfully as below, but I was wondering how could I loop through the checkboxes to get the value for each checkbox?
Any help would be really appreciated!