<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: fit multiple display boxes to window in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248096#M48694</link>
    <description>&lt;P&gt;First, please do send the crashing script to Tech Support - even when the script is not doing things the recommended way, we would like to fix any mishandling that leads to a crash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stretchable displays have many considerations - it would be helpful to know how you are creating the stretchable content.&amp;nbsp; Platforms like Graph Builder have built-in settings like Fit To Window("On"), while for custom content you may be using something like frameBox&amp;lt;&amp;lt;Set Auto Stretching(1,1).&amp;nbsp; If you have an example that you can attach, that would be ideal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even when content is stretchable, the window will still measure all of the boxes and size the window large enough to contain everything (if possible, otherwise it may have to scroll).&amp;nbsp; When adding stretchable content you may want to set the initial size to something small if you don't want the new object to cause a change in the window size.&amp;nbsp; You may also find it useful to call &amp;lt;&amp;lt;Set Min Size() or &amp;lt;&amp;lt;Set Max Size() on the stretchable content - this can change the behavior of stretching when the window is made larger or smaller.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing that you may want to look into is the use of Splitter Box.&amp;nbsp; Splitter Box can help to keep stretching in sync between multiple stretchable objects, and lets you define the initial size of the content.&amp;nbsp; This is counter to the comment above about the window growing large enough to contain the content - Splitter is more forceful about maintaining a size and forcing the child boxes to adjust.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt=Open("$SAMPLE_DATA/Big Class.jmp");
New Window( "stretch",
	H Splitter Box(Size(900,600),
		&amp;lt;&amp;lt;Sizes({.3,.7}),
		
		V Splitter Box(
			dt&amp;lt;&amp;lt;Bivariate(
				Y( :weight ),
				X( :height ),
				SendToReport( Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 201, 170 ), Set Auto Stretching( 1, 1 ), Set Min Size( 50, 50 )} ) )
			), 

			dt&amp;lt;&amp;lt;Oneway(
				Y( :height ),
				X( :sex ),
				SendToReport(
					Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 214, 172 ), Set Auto Stretching( 1, 1 ), Set Min Size( 50, 50 )} )
				)
			)
		), 

		dt&amp;lt;&amp;lt;Graph Builder(
			Show Control Panel( 0 ),
			Fit To Window("On"),
			Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
			Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Feb 2020 18:19:01 GMT</pubDate>
    <dc:creator>danschikore</dc:creator>
    <dc:date>2020-02-18T18:19:01Z</dc:date>
    <item>
      <title>fit multiple display boxes to window</title>
      <link>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248020#M48676</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a script that arranges multiple graphs in a tree of three levels of nested&amp;nbsp;tab boxes. After&amp;nbsp;sorting my initial issue of the script crashing JMP on every single run (I was sending a display box into the wrong type of box I think), I am now trying to polish it.&lt;/P&gt;&lt;P&gt;What I would like to do is to have&amp;nbsp;all my graphs fit to&amp;nbsp;the size of the&amp;nbsp;window. I have noticed that for some reason, I can't resize graphs manually in my final window. As the various graphs get displayed in the window (&amp;lt;&amp;lt;append message), I can see how they all fit together.&amp;nbsp;They all fit nicely in my window until one graph that is larger than the others sort of sets a new standard and they all get bigger and my beautiful layout falls apart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easy way to set the graphs/ the display boxes so that everything automatically resizes to the window size ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:26:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248020#M48676</guid>
      <dc:creator>bobmorrane</dc:creator>
      <dc:date>2023-06-09T23:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: fit multiple display boxes to window</title>
      <link>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248096#M48694</link>
      <description>&lt;P&gt;First, please do send the crashing script to Tech Support - even when the script is not doing things the recommended way, we would like to fix any mishandling that leads to a crash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stretchable displays have many considerations - it would be helpful to know how you are creating the stretchable content.&amp;nbsp; Platforms like Graph Builder have built-in settings like Fit To Window("On"), while for custom content you may be using something like frameBox&amp;lt;&amp;lt;Set Auto Stretching(1,1).&amp;nbsp; If you have an example that you can attach, that would be ideal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even when content is stretchable, the window will still measure all of the boxes and size the window large enough to contain everything (if possible, otherwise it may have to scroll).&amp;nbsp; When adding stretchable content you may want to set the initial size to something small if you don't want the new object to cause a change in the window size.&amp;nbsp; You may also find it useful to call &amp;lt;&amp;lt;Set Min Size() or &amp;lt;&amp;lt;Set Max Size() on the stretchable content - this can change the behavior of stretching when the window is made larger or smaller.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing that you may want to look into is the use of Splitter Box.&amp;nbsp; Splitter Box can help to keep stretching in sync between multiple stretchable objects, and lets you define the initial size of the content.&amp;nbsp; This is counter to the comment above about the window growing large enough to contain the content - Splitter is more forceful about maintaining a size and forcing the child boxes to adjust.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt=Open("$SAMPLE_DATA/Big Class.jmp");
New Window( "stretch",
	H Splitter Box(Size(900,600),
		&amp;lt;&amp;lt;Sizes({.3,.7}),
		
		V Splitter Box(
			dt&amp;lt;&amp;lt;Bivariate(
				Y( :weight ),
				X( :height ),
				SendToReport( Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 201, 170 ), Set Auto Stretching( 1, 1 ), Set Min Size( 50, 50 )} ) )
			), 

			dt&amp;lt;&amp;lt;Oneway(
				Y( :height ),
				X( :sex ),
				SendToReport(
					Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 214, 172 ), Set Auto Stretching( 1, 1 ), Set Min Size( 50, 50 )} )
				)
			)
		), 

		dt&amp;lt;&amp;lt;Graph Builder(
			Show Control Panel( 0 ),
			Fit To Window("On"),
			Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
			Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 18:19:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248096#M48694</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2020-02-18T18:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: fit multiple display boxes to window</title>
      <link>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248586#M48784</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4587"&gt;@danschikore&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the information. I have tried using Splitter box and that made things better. It's, not yet the perfetcly polished script that I would like to deliver but alas I am too short on time to perfect it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For information, here is the model of script I used&amp;nbsp; :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win = New Window( "My tabbed graphs", 

	Data Filter Context Box(
		V Splitter Box(
			Size( 1800, 1000 ), 	
			&amp;lt;&amp;lt;Sizes( {.2, .8} ),
			H Splitter Box( my_filter = my_custom_filter_function(),
 Tb1 = Tab Box() )
		)
	)
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Later on in the script, I have a loop that generates graphs from a list of parameters. It then pushes it to the main window with the &lt;STRONG&gt;append&lt;/STRONG&gt; message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;tpb2 = Tab Page Box( Title( My_List[i] ), Tb2 = Tab Box() );
tb2&amp;lt;&amp;lt;append (my_custom_graphs_function);

tb1&amp;lt;&amp;lt;append (tpb2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Originally I used&amp;nbsp;V List Box instead of V Splitter box. I also fiddled with the graphs sizes in my_custom_graph_function, which is essentially just a graph builder function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 08:43:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/fit-multiple-display-boxes-to-window/m-p/248586#M48784</guid>
      <dc:creator>bobmorrane</dc:creator>
      <dc:date>2020-02-21T08:43:35Z</dc:date>
    </item>
  </channel>
</rss>

