cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
thickey1
Level III

How do I remove Horizontal Scroll Bars from a report window.

I am making a report from a wide(ish) data table using the command

 

dispObj = DT << get as report;

 

This generates a borderBox Display Object which I then add to a new window using

 

newWindow("Test", dispObj);

 

Problem is the report table has a horizontal scroll bar added which I do not want. How do I remove this scroll bar and allow the report display object to fill the window fully in the horizontal direction? If the Window is widened it does not make a difference to the underlyng report...i.e. it does not widen or remove the scroll bars

reportWindow.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I remove Horizontal Scroll Bars from a report window.

My experience with this, is that if you change the window size for the data table, before you move the table into the report.

names default to here(1);
dt=current data table();
dt<<set window size(2400,800);
dispObj = DT << get as report;
newWindow("Test", dispObj);
Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: How do I remove Horizontal Scroll Bars from a report window.

My experience with this, is that if you change the window size for the data table, before you move the table into the report.

names default to here(1);
dt=current data table();
dt<<set window size(2400,800);
dispObj = DT << get as report;
newWindow("Test", dispObj);
Jim
thickey1
Level III

Re: How do I remove Horizontal Scroll Bars from a report window.

Jim, I like this solution and didn't realise the report generated is dependant on the table (window) size. Do you know of a way to identify the width of the contents of a data table window - i.e. the width of the combined columns - not the width of the DT Window which I could get with  DT<< getWindowSize() . This would allow me to dynamically set the window size to the width of the columns in my data table (up to a max width dependent on my GUI) before allowing the scroll bar to be used.

 

Cheers.

Re: How do I remove Horizontal Scroll Bars from a report window.

One way to ensure that no scroll bars are used is to turn off the scrolling for the TableBox all together. See example below for details.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

rpt = dt << get as report();
rpt[Table Box( 1 )] << Set scrollable( 0 );

New Window( "Test", rpt );

EDIT:  Please note that this also turns off the vertical scroll bar. 

Justin
David_Burnham
Super User (Alumni)

Re: How do I remove Horizontal Scroll Bars from a report window.

I line up the report with a wide spacer box:

 

dt = current data table();
dispObj = dt << get as report;
new window("test",
	LineupBox(NCol(1),
		Spacer Box(Size(1200,0)),
		dispObj	
	)
)
-Dave