cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
cerdmh
Level I

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
pmroz
Super User

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"}),
		)
	)
);

TblComboBox.png

cerdmh
Level I

Re: Use ComboBox on TableBox

Thanks pmroz

 

Exactly what I needed

cerdmh
Level I

Re: Use ComboBox on TableBox

Thanks pmroz

 

Exactly what I needed

txnelson
Super User

Re: Use ComboBox on TableBox

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

checkbox.PNG

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