cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
pmroz
Super User

The Ever-Expanding Buttons (controlling button box width)

Hello all,

I have a weird problem in JMP 12.2.  When I run the code below, successive switching between the tabs using the button on the first tab yields button boxes that grow in width.

nw = new window("Test",
	tbb = tab box(
		"First",
		vlistbox(
			text box("Not much here"),
			button box("Go to Second", tbb << set selected(2)),
		),
		"Second",
		tb = tablebox(
			scb = string col box("AAA", {"Hello", "World", "Fubar", "Festival"}),
			cb = col box("Actions",
				b1 = button box(""),
				t2 = text box(""),
				t3 = text box(""),
				b4 = button box(""),
			),
		),
	),
);

tb << set underline headings(1) << set column borders(1) << set row borders(1) << set shade alternate rows(1);

b1 << set icon("ControlC");
b4 << set icon("WinFilePrintPreview");

Here's what it looks like:

ExpandingButtons.png

To see the effect, run the code and click on the "Go to Second" button.  This will switch to the "Second" tab.  Now click on the "First" tab and click the "Go to Second" button again.  Keep doing this and you'll see what I'm talking about.

Is there a way to force a button to be a particular width?  I tried putting a button inside a border box and setting the width of the border box, but that didn't work.  BTW this behavior is not evident in JMP 13.2.

2 REPLIES 2
pmroz
Super User

Re: The Ever-Expanding Buttons (controlling button box width)

Found a fix:

b1 << set max size(30, 50);
b4 << set max size(30, 50);

This seems to do the trick.

Craige_Hales
Super User

Re: The Ever-Expanding Buttons (controlling button box width)

Looks like this issue was fixed in JMP 13.

Craige