- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Use ComboBox on TableBox
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
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Use ComboBox on TableBox
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"}),
)
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Use ComboBox on TableBox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Use ComboBox on TableBox
Thanks pmroz
Exactly what I needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Use ComboBox on TableBox
Created:
Jun 11, 2018 08:00 AM
| Last Modified: Jun 11, 2018 5:01 AM
(3933 views)
| Posted in reply to message from cerdmh 06-11-2018
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 )
)
);
Jim