<?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: Update/redraw ListBox's contents in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34619#M20458</link>
    <description>&lt;P&gt;check this one out&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
New Window( "Example",
	&amp;lt;&amp;lt;Modal,
	H List Box(
		V List Box(
			clb = Col List Box( ),
			clb &amp;lt;&amp;lt; append(  dt &amp;lt;&amp;lt; get column names ),
			Button Box( "Lot Column",
							 LotCold &amp;lt;&amp;lt; Append(  clb &amp;lt;&amp;lt; GetSelected )
						),
						 LotCold = Col List Box(
						),
		),
	), 
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Look at the File Exchange&amp;nbsp;for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class="lia-link-navigation blog-article-link lia-link-disabled"&gt;Runs Test (Wald-Wolf&lt;WBR /&gt;owitz Test) and JSL Implementa&lt;WBR /&gt;tion of JMP Platform Dialog Box&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For an example of a fairly complete implementation of the JMP Platform dialog box, with filtering, recall, help, etc.&amp;nbsp; All of which can be ported easily to other scripts.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2017 06:37:31 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-01-17T06:37:31Z</dc:date>
    <item>
      <title>JSL: Update/redraw ListBox's contents</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34587#M20457</link>
      <description>&lt;P&gt;I have a ListBox ("listDisplay") that is initialized with an empty list ("workingList") on a form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the user works through the form, new entries are added to "workingList". Is there a way to force "listDisplay" to redraw itself with the updated "workingList" on demand? I've tried &amp;lt;&amp;lt;UpdateWindow, but that didn't do the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that doesn't work, how can I tell "listDisplay" to overwrite its currently displayed values with the&amp;nbsp;updated incarnation of "workingList"? I looked through the scripting index but couldn't find the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One last thing...if anyone knows a way to circumvent the need for "workingList", I'm all ears. I suppose there's something clever that could be done with calling &amp;lt;&amp;lt;Get on the ListBox itself, but I'm at a loss.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stripped-down example code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;workingList = {};
New Window( "Example",
	&amp;lt;&amp;lt;Modal,
	H List Box(
		V List Box(
			clb = Col List Box( All ),
			Button Box( "Add", 
				workingList = Insert(workingList, clb&amp;lt;&amp;lt;get selected);
				//redraw listDisplay?
			),
			listDisplay = List Box( workingList ),
		),
	), 
);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Also -- why isn't my JSL code being highlighted in the box above? I'm using the "Insert JSL Script" button on the toolbar. Is there something else that needs to be done?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 20:01:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34587#M20457</guid>
      <dc:creator>ABI</dc:creator>
      <dc:date>2017-01-16T20:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Update/redraw ListBox's contents</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34619#M20458</link>
      <description>&lt;P&gt;check this one out&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
New Window( "Example",
	&amp;lt;&amp;lt;Modal,
	H List Box(
		V List Box(
			clb = Col List Box( ),
			clb &amp;lt;&amp;lt; append(  dt &amp;lt;&amp;lt; get column names ),
			Button Box( "Lot Column",
							 LotCold &amp;lt;&amp;lt; Append(  clb &amp;lt;&amp;lt; GetSelected )
						),
						 LotCold = Col List Box(
						),
		),
	), 
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Look at the File Exchange&amp;nbsp;for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN class="lia-link-navigation blog-article-link lia-link-disabled"&gt;Runs Test (Wald-Wolf&lt;WBR /&gt;owitz Test) and JSL Implementa&lt;WBR /&gt;tion of JMP Platform Dialog Box&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For an example of a fairly complete implementation of the JMP Platform dialog box, with filtering, recall, help, etc.&amp;nbsp; All of which can be ported easily to other scripts.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 06:37:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34619#M20458</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-17T06:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Update/redraw ListBox's contents</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34662#M20467</link>
      <description>&lt;P&gt;Thank you, Jim, this works beautifully. I've grabbed your Runs Test addin and can already tell it's going to help immensely with my current project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While I have your ear, would it be possible to do something like resize the number of entry boxes in a NumberColEditBox based on the currently displayed list size of ListBox? I couldn't find an example of this behavior elsewhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Current Data Table();
New Window( "Example",
	&amp;lt;&amp;lt;Modal,
	H List Box(
		V List Box(
			clb = Col List Box(),
			clb &amp;lt;&amp;lt; append( dt &amp;lt;&amp;lt; get column names ),
			Button Box( "Lot Column", 
				LotCold &amp;lt;&amp;lt; Append( clb &amp;lt;&amp;lt; GetSelected ),
				//Increase # of edit boxes available in NumBox so that it's equal to number of entries in LotCold?
			),
			LotCold = List Box(),
			NumBox = NumberColEditBox("",{}),
		),

	),

);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: You probably don't remember me, but we had talked briefly at the jmp summit a few months back. It's great to see you here --&amp;nbsp;you'd given me a couple of great pointers for working in jsl, and working in general ("the best work gets accomplished in the morning"). Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 16:45:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34662#M20467</guid>
      <dc:creator>ABI</dc:creator>
      <dc:date>2017-01-17T16:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Update/redraw ListBox's contents</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34664#M20469</link>
      <description>&lt;P&gt;try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
New Window( "Example", 
	//&amp;lt;&amp;lt;Modal,
	H List Box(
		V List Box(
			clb = Col List Box(),
			clb &amp;lt;&amp;lt; append( dt &amp;lt;&amp;lt; get column names ),
			Button Box( "Lot Column",
				LotCold &amp;lt;&amp;lt; Append( clb &amp;lt;&amp;lt; GetSelected );
				numbox &amp;lt;&amp;lt; delete;
				myvalues = [];
				For( i = 1, i &amp;lt;= N Items( lotcold &amp;lt;&amp;lt; get items ), i++,
					myvalues = V Concat( Myvalues, i )
				);
				thevlb &amp;lt;&amp;lt; append( numbox = Number Col Edit Box( "", myvalues ) );
				//Increase # of edit boxes available in NumBox so that it's equal to number of entries in LotCold?
			),
			LotCold = List Box(),
			Text Box( "The Number Col Edit Box" ),
			thevlb = V List Box( numbox = Number Col Edit Box( "", [] ) )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:22:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34664#M20469</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-17T18:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Update/redraw ListBox's contents</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34683#M20483</link>
      <description>Beautiful, thanks again</description>
      <pubDate>Wed, 18 Jan 2017 14:31:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Update-redraw-ListBox-s-contents/m-p/34683#M20483</guid>
      <dc:creator>ABI</dc:creator>
      <dc:date>2017-01-18T14:31:36Z</dc:date>
    </item>
  </channel>
</rss>

