cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lukasz
Level IV

How to define size/length of the List Box?

Hello Everybody,

I have this simple List Box. After starting the script the size/length of the List Box depends on number of items to be displayed. Since I want to use the available space in my GUI, it would be good to define the size of the List box and make it longer. I know I can do that by mouse, but I would like to define it in script. Is there any way to do that? I would appreciate for hints how to do that. Thank you and best regards.

parameter_list = {"parameter_1", 
				"parameter_2", 
				"parameter_3", 
				"parameter_4" 								  
				};
				
New Window("Example",            
	H List Box(
		Panel Box("Parameters",
			params = List Box( 
				parameter_list, 
				max selected( 1 ), 
				selected = (params << get selected indices)[1];
			),
		), 
	),   	
);
1 REPLY 1
lukasz
Level IV

Re: How to define size/length of the List Box?

Ok, I got it. The only thing was to add the command nlines() defining numbers of lines to be displayed.

New Window("Example",            
	H List Box(
		Panel Box("Parameters",
			params = List Box( 				 
				parameters_list,
				nlines(10),
				max selected( 1 ), 
				selected = (params << get selected indices)[1];							
			),
		), 
	),  	
);

 

Recommended Articles