<?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: JSL help updating panel box upon change of combo box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427823#M67729</link>
    <description>&lt;P&gt;This might get you started:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

UInames = {"UI One", "UI Two"};
UIList = {PanelBox(UInames[1], TextBox("One")), PanelBox(UInames[2], TextBox("Two"))};

cb = ComboBox(UInames, &amp;lt;&amp;lt; SetFunction(
								Function( {this, index},
									(this &amp;lt;&amp;lt; sib) &amp;lt;&amp;lt; delete;
									this &amp;lt;&amp;lt; sibAppend(Eval(UIlist[index]))
										)
									)
							);

NewWindow("Dynamic UI", LineUpBox(NCol(1), cb, Eval(UIlist[1])));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Oct 2021 16:23:49 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2021-10-18T16:23:49Z</dc:date>
    <item>
      <title>JSL help updating panel box upon change of combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427796#M67724</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm working on some JSL code where I'd like it to do something like the platform interface of the support vector machines (for those with Pro, for those without, the screen shots should help explain further).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'd like the panel box that contains a combo box to update and show different options based on the user selection of the combo box. With the SVM example, I'd like to do something similar: If the user selects the first combo box option, it results in an updated panel box like that shown in the first screenshot. Then, if the user selects the next option, the panel box is updated to show the new options, like the second screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_0-1634571310370.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36804i66ADD7C2EE60B170/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_0-1634571310370.png" alt="DiedrichSchmidt_0-1634571310370.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_1-1634571337824.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36805i9E1ED34502BE2FD2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_1-1634571337824.png" alt="DiedrichSchmidt_1-1634571337824.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The combo boxes don't allow for the On Change() call, and I can't seem to get a Function call to work when the combo box is changed. I'm thinking of maybe doing an UpdateWindow call, but having a hard time figuring out how to do that correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any suggestions appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:03:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427796#M67724</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2023-06-09T18:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: JSL help updating panel box upon change of combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427823#M67729</link>
      <description>&lt;P&gt;This might get you started:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

UInames = {"UI One", "UI Two"};
UIList = {PanelBox(UInames[1], TextBox("One")), PanelBox(UInames[2], TextBox("Two"))};

cb = ComboBox(UInames, &amp;lt;&amp;lt; SetFunction(
								Function( {this, index},
									(this &amp;lt;&amp;lt; sib) &amp;lt;&amp;lt; delete;
									this &amp;lt;&amp;lt; sibAppend(Eval(UIlist[index]))
										)
									)
							);

NewWindow("Dynamic UI", LineUpBox(NCol(1), cb, Eval(UIlist[1])));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 16:23:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427823#M67729</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2021-10-18T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: JSL help updating panel box upon change of combo box</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427878#M67735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks for the quick feedback and help. I did need to modify it a little bit so that it was only changing part of the panel box and not all of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This modified version is one that does what I was hoping to get, and I couldn't have done it without your snippet of code. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Names Default To Here( 1 );

UInames = {"Option One", "Option Two"};

lublist = {Lineup Box( N Col( 3 ), Spacing( 3, 3 ), Text Box( "A" ), Text Box( "B" ), Number Edit Box( 7, 6 ) ),
Lineup Box( N Col( 3 ), Spacing( 3, 3 ), Text Box( "C" ), Text Box( "D" ), Number Edit Box( 10, 6 ) )};

cb = Combo Box(
	UInames,
	&amp;lt;&amp;lt;SetFunction(
		Function( {this, index},
			(this &amp;lt;&amp;lt; sib) &amp;lt;&amp;lt; delete;
			this &amp;lt;&amp;lt; sibAppend( Eval( lublist[index] ) );
		)
	)
);

nw = New Window( "Dynamic UI", Lineup Box( N Col( 1 ), Panel Box( "UI Choices", cb, Eval( Lublist[1] ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 17:41:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-updating-panel-box-upon-change-of-combo-box/m-p/427878#M67735</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2021-10-18T17:41:44Z</dc:date>
    </item>
  </channel>
</rss>

