<?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: Display Box: Level? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599798#M80322</link>
    <description>&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;let's see ...&lt;BR /&gt;Case TS-00034009&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 21:54:52 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-02-10T21:54:52Z</dc:date>
    <item>
      <title>Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/598441#M80220</link>
      <description>&lt;P&gt;Is the a command to get the level/depth (?) of a Display Box, i.e. the number ot parents to get to the top parent?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:37:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/598441#M80220</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-08T16:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599378#M80279</link>
      <description>&lt;P&gt;How about using&amp;nbsp;Get Display Path()? Get Display Path () gets a relatively expression to navigate between parent box and object. Ifyou want to count the number of parents to get to the top parent, try following jsl.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt &amp;lt;&amp;lt; Bivariate( Y( :weight ), X( :height ), Fit Line );
rpt = Report( biv );
rootParent = rpt &amp;lt;&amp;lt; Top Parent();
path_to_parent = rpt[number col Box( 9 )] &amp;lt;&amp;lt; Get Display Path( rootParent, Mode( "Subscript" ) ); 
count = N Items( Words( Char( Eval Expr( path_to_parent ) ), "," ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2023 00:51:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599378#M80279</guid>
      <dc:creator>yuichi_katsumur</dc:creator>
      <dc:date>2023-02-10T00:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599457#M80286</link>
      <description>&lt;P&gt;I had the same idea :)&lt;/img&gt;&lt;BR /&gt;But it seems that sometimes&amp;nbsp;&lt;STRONG&gt;Get Display Path&lt;/STRONG&gt;&amp;nbsp;doesn't go step by step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New window("test",Panel Box("1",Panel box("2",PanelBox("3",HList Box(Spacer Box(100),Text Box("4"),V List Box(Text Box("5"),Spacer Box(Size(100,100)),tb=Text Box("6")))))));
rootParent = tb &amp;lt;&amp;lt; Top Parent();
path_to_parent = tb &amp;lt;&amp;lt; Get Display Path( rootParent, Mode( "Subscript" ) ); 
count = N Items( Words( Char( Eval Expr( path_to_parent ) ), "," ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 06:45:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599457#M80286</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-02-10T06:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599473#M80287</link>
      <description>&lt;P&gt;Based on the scripting index the purpose of &amp;lt;&amp;lt; Get Display Path isn't to provide you with a full path but rather "robust" expression (robust path).&lt;/P&gt;
&lt;P&gt;XPath or recursive function might be be fairly easy to implement (no idea if this will always work, some platforms in JMP can be quite complicated and some elements might not be captured)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("test", // 6
	Panel Box("1", // 5
		Panel Box("2", // 4
			Panel Box("3", // 3
				H List Box( // 2
					Spacer Box(100),
					Text Box("4"),
					V List Box( // 1
						Text Box("5"), 
						Spacer Box(Size(100, 100)), 
						tb = Text Box("6") // 0
					)
				)
			)
		)
	)
);

get_parents = function({elem, idx = 0}, 
	next_elem = elem &amp;lt;&amp;lt; parent;
	If(Is Empty(next_elem),
		return(idx);
	);
	idx++;
	show(next_elem &amp;lt;&amp;lt; class name);
	get_parents(next_elem, idx);
);

show(get_parents(tb)); // has also the headbox
parent_count = N Items(nw &amp;lt;&amp;lt; XPath("//TextBox[text() = '6']/ancestor::*"));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2023 09:06:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599473#M80287</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-10T09:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599476#M80288</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;BR /&gt;How about the following script? The script repeats the parent function until it reaches the top parent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window( "test",
	pb1 = Panel Box( "1",
		pb2 = Panel Box( "2",
			pb3 = Panel Box( "3",
				H List Box(
					Spacer Box( 100 ),
					tb4 = Text Box( "4" ),
					V List Box(
						tb5 = Text Box( "5" ),
						Spacer Box( Size( 100, 100 ) ),
						tb6 = Text Box( "6" )
					)
				)
			)
		)
	)
);

//count parent display box from target to top display box
count parent = Function( {nw, target, top}, //window, target display box, top display box
	top_parent = top;
	end = 0;
	current = target;
	displaybox_list = {};
	For( i = 1, And( end == 0, i &amp;lt; 100 ), i++,
		parent = current &amp;lt;&amp;lt; parent();
		If( Is Empty( parent ),
			end = 1,
			current = parent;
			Insert Into( displaybox_list, current );
			If( top_parent == current,
				end = 1
			);
		);
	);
	Eval List( {i - 1, displaybox_list} );
);


{count, displaybox_list} = count parent( nw, tb6, pb1 );
show(count);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2023 09:22:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599476#M80288</guid>
      <dc:creator>yuichi_katsumur</dc:creator>
      <dc:date>2023-02-10T09:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599717#M80317</link>
      <description>&lt;P&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;I just tried it with a slightly different tree and got a stack overflow.&lt;BR /&gt;Here the parent function doesn't climb up the tree?!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "test", 
H List Box( Panel Box(
 "", H List Box( Text Box( "Hallo" ), tb = Filter Col Selector() ) ) ) );


get_parents = Function( {elem, idx = 0},
	next_elem = elem &amp;lt;&amp;lt; parent;
	If( Is Empty( next_elem ),
		Return( idx )
	);
	idx++;
	Print( idx );
	Show( next_elem &amp;lt;&amp;lt; class name );
	get_parents( next_elem, idx );
);

Show( get_parents( tb ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2023 20:12:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599717#M80317</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-02-10T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599733#M80320</link>
      <description>&lt;P&gt;If I would have to guess it reaches filter col selector and starts from beginning for some reason (Filter Col Selector is one of the buggiest and most annoying display boxes to work with in JMP in my opinion). XPath might still work but the query can be more annoying to build.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 20:47:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599733#M80320</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-10T20:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599798#M80322</link>
      <description>&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;let's see ...&lt;BR /&gt;Case TS-00034009&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 21:54:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/599798#M80322</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-02-10T21:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/611107#M81165</link>
      <description>Thanks for reporting the issue! I can confirm that Development has received it and already made some improvements to the behavior of these display box messages for the next major release of JMP.</description>
      <pubDate>Mon, 13 Mar 2023 12:15:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/611107#M81165</guid>
      <dc:creator>Audrey_Shull</dc:creator>
      <dc:date>2023-03-13T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display Box: Level?</title>
      <link>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/847430#M102220</link>
      <description>&lt;P&gt;Thanks for fixing it.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 21:21:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-Box-Level/m-p/847430#M102220</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-03-11T21:21:53Z</dc:date>
    </item>
  </channel>
</rss>

