cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
tom_abramov
Level V

Resizing Data Box

Is there a way to fix/resize by user the size of the data box?
Currently the size of the box is set automatically due to the objects in the window.

 

dt = Open("$SAMPLE_DATA/Big Class.jmp");
New Window("A",
	H List Box(
		V List Box(dt << New Data Box(), obj = dt << Bivariate(Y(:Weight), X(:Height))),
		Spacer Box(<<size(30, 0))
	)
);
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Resizing Data Box

If that scroll box option isn't what you want, then you can try directly resizing the DataBrowserBox (disable auto stretching)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("A",
	H List Box(
		V List Box(
			db = dt << New Data Box(), 
			obj = dt << Bivariate(Y(:Weight), X(:Height))),
			Spacer Box(<<size(30, 0))
	)
);
wait(2); // demo purposes
db << Set Auto Stretching({0, 0});
db << Set Width(300);
db << Set Height(200);
-Jarmo

View solution in original post

11 REPLIES 11
txnelson
Super User

Re: Resizing Data Box

The window size can be changed by passing the Set Window Size message to the New Window

Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "A",
	H List Box(
		V List Box(
			dt << New Data Box(),
			obj = dt <<
			Bivariate( Y( :Weight ), X( :Height ) )
		),
		Spacer Box( <<size( 30, 0 ) )
	)
);

nw << set window size( 600, 800 );

txnelson_0-1720955368113.png

P.S.  Please use the JSL icon at the top of the Preview Window to enter JSL.  It provides the user with an easier form of the code to read and understand.

Jim
tom_abramov
Level V

Re: Resizing Data Box

Thank you,

I am aware of this solution.

However, I have a full-screen dashboard with a data box inside, meaning the main window is fixed in size (full-screen). I would like to adjust the size of the data box independently of the parent window.

txnelson
Super User

Re: Resizing Data Box

I am not aware of a reliable way to do that.  Others more experienced in creating Dashboards may have an answer.

Jim
jthi
Super User

Re: Resizing Data Box

You can for example place the data box inside Scroll Box

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("A",
	H List Box(
		V List Box(
			Scroll Box(size(100, 100), dt << New Data Box()),
			obj = dt << Bivariate(Y(:Weight), X(:Height))
		),
		Spacer Box(<<size(30, 0))
	)
);

nw << set window size(600, 800);

jthi_0-1720971381516.png

 

-Jarmo
hogi
Level XII

Re: Resizing Data Box

makes the data view smaller, but definitely no fun to work with 2 stacked scroll bars ...

tom_abramov
Level V

Re: Resizing Data Box

Thank  you,

Tried this solution as well

Resizing scroll box does not resize the data box.

jthi
Super User

Re: Resizing Data Box

If that scroll box option isn't what you want, then you can try directly resizing the DataBrowserBox (disable auto stretching)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("A",
	H List Box(
		V List Box(
			db = dt << New Data Box(), 
			obj = dt << Bivariate(Y(:Weight), X(:Height))),
			Spacer Box(<<size(30, 0))
	)
);
wait(2); // demo purposes
db << Set Auto Stretching({0, 0});
db << Set Width(300);
db << Set Height(200);
-Jarmo
hogi
Level XII

Re: Resizing Data Box

the minimum height is given by the side panel, so maybe close it?

- and reduce the size of the header:

db << close side panels( 1 ) << close summary panels( 1 ) << Set Header Height( 20 );
tom_abramov
Level V

Re: Resizing Data Box

Thanks! Was looking for "close side panels". Very helpful.