cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

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

ComboBox dropdown resizing issue with lengthy values

I’m running into an issue with the ComboBox in JMP. The dropdown width is automatically adjusted based on the longest value in the list. Since I’m loading data from a database, most values are short, but a few are very lengthy. When those long values are included, the entire dropdown becomes excessively wide.

I haven’t been able to find any documentation on how to control or fix the dropdown size. Is there a way to set a maximum width or otherwise prevent the ComboBox from expanding too much when one value is lengthy?


// Example ComboBox with mixed-length values New Window( "ComboBox Size Issue", <<Background Color( "white" ), V List Box( Text Box( "Select an option:" ), Combo Box( {"Cat", "Dog", "Bird", "Elephant", "ThisIsASingleVeryVeryVeryLongValueThatMakesTheDropdownTooWide aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaabbbbbbb"}, <<Set Function( Function( {this}, Show( this << Get Selected ) )) ) ) );
4 REPLIES 4
jthi
Super User

Re: ComboBox dropdown resizing issue with lengthy values

I'm not sure if you can force the max size of combo box so you would have to first shorten those values. 

-Jarmo

Re: ComboBox dropdown resizing issue with lengthy values

Truncating the data would be costly since the data is in the thousands.

jthi
Super User

Re: ComboBox dropdown resizing issue with lengthy values

Have you tried how costly it would be if you do it in JMP either with Transform Each() or with formula column/transform column only on unique values?

-Jarmo
jthi
Super User

Re: ComboBox dropdown resizing issue with lengthy values

You can "force" Combo Box width at least with Lineup Ruler Box + Lineup Box

Names Default To Here(1);

nw = New Window("",
	Lineup Ruler Box(
		Widths({100}),
		Lineup Box(N Col(1),
			Combo Box({"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"})
		)
	)
);

jthi_0-1764089807743.png

 

-Jarmo

Recommended Articles