Subscribe Bookmark RSS Feed

JSL :: Event handling or Data binding to list boxes

ThorstenSaeger

Community Trekker

Joined:

Sep 26, 2016

Hello JMP Community,

I am in the middle of designing a GUI which allows to select an input table/ columns and an output table/ columns.  I am strunggeling with on how JSL handles mous clicks:  I want to select a table using a combo box, with a Col List Box updating following the mouse click on the combo box (how does the data binding of the Col list Box occur?).  Please have a look at the attached image for details.

jmp_jsl_q.png

 

Any help apprechiated!

 

Thanks and best,

Thorsten

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Because of the specifics on the Col List Box(), what I find the best, and maybe the only way to handle the replacement of the data table associated with the object, is to delete the object and to replace it.

Names Default To Here( 1 );
QorvoPE_Select_Table = Function( {},
	table_list = {};
	For( t = 1, t <= N Table(), t++,
		Insert Into( table_list, Data Table( t ) << get name )
	);
	QorvoPE_Select_Table_dlg = New Window( "Select Data Table For Limit Calculation. ",
		<<modal,
		<<return result,
		Panel Box( "Select Table and columns",
			select_table = Combo Box(
				table_list,
				table = select_table << get selected();
				data col clb# << delete;
				MYHLB << append(
					data col clb# = Col List Box( Data Table( select_table << get selected ), all )
				);
			),
			MYHLB = H List Box(
				data col clb# = Col List Box( Data Table( select_table << get selected ), all ), 

			)
		)
	);
);

QorvoPE_Select_Table;
Jim
2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Because of the specifics on the Col List Box(), what I find the best, and maybe the only way to handle the replacement of the data table associated with the object, is to delete the object and to replace it.

Names Default To Here( 1 );
QorvoPE_Select_Table = Function( {},
	table_list = {};
	For( t = 1, t <= N Table(), t++,
		Insert Into( table_list, Data Table( t ) << get name )
	);
	QorvoPE_Select_Table_dlg = New Window( "Select Data Table For Limit Calculation. ",
		<<modal,
		<<return result,
		Panel Box( "Select Table and columns",
			select_table = Combo Box(
				table_list,
				table = select_table << get selected();
				data col clb# << delete;
				MYHLB << append(
					data col clb# = Col List Box( Data Table( select_table << get selected ), all )
				);
			),
			MYHLB = H List Box(
				data col clb# = Col List Box( Data Table( select_table << get selected ), all ), 

			)
		)
	);
);

QorvoPE_Select_Table;
Jim
ThorstenSaeger

Community Trekker

Joined:

Sep 26, 2016

Thank you very much!

That helped a lot.

 

Best wishs,

--Thorsten