Hi
I want to make a tablebox that one of it column eatch cell can have a value of "Yes" or "No"
thought of using a combobox for it
try using the following code with no success
new window("Bla Bla",
tb = Table Box(
c1 = String Col Box( "Bla Bla", {cb = combo box({"Yes","No"}) << get selected})
)
)
any idea
Col boxes will do what you need:
new window("Combo Boxes in Tablebox",
tb = Table Box(
c1 = Col Box( "Bla Bla",
cb1 = combo box({"Yes","No"}),
cb2 = combo box({"Yes","No"}),
cb3 = combo box({"Yes","No"}),
)
)
);
Thanks pmroz
Exactly what I needed
I am not aware of being able to use a Combo Box() in a Table Box(), however, you can use a Check Box() to accomplish the same type of functionallity, as your Yes/No, but just by Check Box() selections
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
// Create a list of blank labels for the checkboxes
labelList = {};
For( i = 1, i <= N Rows( dt ), i++,
Insert Into( labelList, "" )
);
// Create a display with a table box()
New Window( "Select Names",
tb = Table Box(
// Add the list boxes to the data table
cb = Check Box(
labelList,
For( i = 1, i <= N Rows( dt ), i++,
If( cb << get( i ) == 1,
Print( dt:Name[i] )
)
)
),
// Add the names from the data table
scb = String Col Box( "Name", dt:Name << get values )
)
);