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
ionatx
Level II

Project ignoring H Splitter Box Set Sizes . . . sometimes

I'm working with a JMP 17 Project and have a script to import a CSV file, embed a script into the Data Table, and execute the embedded script. The embedded script creates a graph from the data and sets the Project layout. All of these pieces, executed individually, work as intended. The problem I am having is that when I execute the combined script, the outer H Splitter Box ignores <<Set Sizes and collapses the left pane (Workspace, Contents, etc.) into a very small space that needs to be manually resized. To make matters worse, this doesn't happen all the time. It happens 100% of the time when the project is empty (which is how it will be used most of the time), but if a data table is already open, it happens . . . somewhere between always and never, and seems to be random.

 

I have tried Wait() and executing the graph/layout script with Include(), neither make any difference.

 

Is this a bug, or am I doing something wrong? I've found that the same thing happens if I set the layout using a Project on Open Script under Project Settings.

 

Here is the full code:

Names Default to Here( 1 );

dt	=	Open(

			path = Pick File(
				"Select a file",
				"",										
				{ "CSV or TXT|csv;txt" },	
				1,										
				0,										
				"",										
			),

			Import Settings(
				Labels( 1 ),
				Column Names Start( 13 ),
				Data Starts( 14 ),
			),
		);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

dt	<<	New Script(
	"Graph",

	Names Default to Here( 1 );

	pj	=	This Project();
	dt	=	Current Data Table();
	dt	<<	Set Window ID("Table1");

	gb	=	dt
		<<	Graph Builder(
				Show Control Panel( 0 ),
				Show Legend( 0 ),
				Lock Scales( 1 ),
				Fit to Window( "On" ),
				Variables( X( :Ex ), Y( :Why )
				),
				Elements( Points( X, Y )
				),

				SendToReport(
					Dispatch( {}, "Ex", Scalebox, {Min(0), Max(2)}
					),

					Dispatch( {}, "Why", Scalebox, {Min(0), Max(2.25)}
					),

				),

		);
	gb	<<	Set Window ID("Graph1");

	img	=	New Image( "jmpprj://contents/Assets/Bins.png" );
	frm	=	(gb << report)[FrameBox( 1 )]
		<<	Add Image(
				image( img ),
				Lock( 1 ),
				Bounds(
					Left( 0 ),
					Right( 2 ),
					Top( 2.25 ),
					Bottom( 0 ),
				),
		);
	pj	<<	Set Layout(
		H Splitter Box(
			<<Set Sizes({0.1, 0.9}),
			V Splitter Box(
				<<Set Sizes({0.33, 0.33, 0.33}),
				Tab Page Box(Window ID("Workspace")
				),
				Tab Page Box(Window ID("Contents")
				),
				Tab Page Box(Window ID("Recent Files")
				)
			),
			H Splitter Box(
				<<Set Sizes({0.5, 0.5}),
					Tab Page Box(Window ID( "Graph1" )),
				Tab Box(
					Tab Page Box(Window ID( "Table1" ))
				)
			)
		)
	)
);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

dt	<<	Run Script( "Graph" );

 

 

 

 

0 REPLIES 0