cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Phil_Brown
Super User (Alumni)

ListBox size

Is there a way to retrieve the set the size of a TableBox? There is a message for GETTING the size but it doesn't appear there's a way to SET size. Maybe I'm missing something?

 

 

The display box 'TableBox' does not recognize the message 'set size'; perhaps you mean one of these:  <<Get Size <<Set Window Size <<Get Window Size <<User Resizable <<Reset Style <<Set Shade Cells <<Set Shade Headings <<Set Scrollable <<Set Selectable Rows <<Set Selected Rows <<Get As Matrix <<Set Click Sort <<Paste <<Select <<Inval Size <<Selectable <<Set Report Title <<Set Window Title <<Delete <<Show Properties <<Restore Window Size <<Get Text <<Get Script <<Get Picture <<Save Text <<Save RTF <<Save Picture <<Save Capture <<Set Window ID <<Get Content Size <<Set Content Size <<Size Window <<Set Window Title <<Set Print Headers <<Set Print Footers <<Set Page Setup <<Get Page Setup <<GetOffset <<SetNotStretchable <<Get Min Size <<Set Min Size <<Get Max Size <<Set Max Size <<Set Auto Stretching <<Get Row States <<Set Width <<Set Height <<Set Property <<Set Property.

PDB
1 ACCEPTED SOLUTION

Accepted Solutions

Re: ListBox size

There is no Set Size message for a Table Box. However, you can set the size for the columns within the Table Box. 

 

In the example below, I create a Table Box that contains two String Col Boxes. The sizes of the Table Box and String Col Boxes are shown before and after changing the size of the columns.

 

New Window( "test",
	tb = Table Box(
		scb1 = String Col Box( "a", {"x", "y", "z"} ),
		scb2 = String Col Box( "b", {"1", "2", "3"} )
	)
);
Write( "before:" );
Show( tb << Get Size(), scb1 << Get Size(), scb2 << Get Size() );

scb1 << Set Width( 300 );
scb2 << Set Width( 400 );

Wait( 0 ); // Wait for display to update so that get size returns latest size

Write( "\!N\!Nafter:" );
Show( tb << Get Size(), scb1 << Get Size(), scb2 << Get Size() );

Below is the resulting log. Notice how the size of the Table Box is a few pixels larger than the sum of the sizes of the columns it contains.

 

/*:
before:
tb << Get Size() = {39, 74};
scb1 << Get Size() = {18, 72};
scb2 << Get Size() = {20, 72};

after:
tb << Get Size() = {701, 74};
scb1 << Get Size() = {300, 72};
scb2 << Get Size() = {400, 72};

 

Justin

View solution in original post

4 REPLIES 4
Phil_Brown
Super User (Alumni)

Re: ListBox size

 
PDB

Re: ListBox size

There is no Set Size message for a Table Box. However, you can set the size for the columns within the Table Box. 

 

In the example below, I create a Table Box that contains two String Col Boxes. The sizes of the Table Box and String Col Boxes are shown before and after changing the size of the columns.

 

New Window( "test",
	tb = Table Box(
		scb1 = String Col Box( "a", {"x", "y", "z"} ),
		scb2 = String Col Box( "b", {"1", "2", "3"} )
	)
);
Write( "before:" );
Show( tb << Get Size(), scb1 << Get Size(), scb2 << Get Size() );

scb1 << Set Width( 300 );
scb2 << Set Width( 400 );

Wait( 0 ); // Wait for display to update so that get size returns latest size

Write( "\!N\!Nafter:" );
Show( tb << Get Size(), scb1 << Get Size(), scb2 << Get Size() );

Below is the resulting log. Notice how the size of the Table Box is a few pixels larger than the sum of the sizes of the columns it contains.

 

/*:
before:
tb << Get Size() = {39, 74};
scb1 << Get Size() = {18, 72};
scb2 << Get Size() = {20, 72};

after:
tb << Get Size() = {701, 74};
scb1 << Get Size() = {300, 72};
scb2 << Get Size() = {400, 72};

 

Justin

Re: ListBox size

How to change width of lost box?

Re: ListBox size

got it