<?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: How to call a function or process when checkbox is checked in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520973#M74642</link>
    <description>&lt;P&gt;Use the message&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; set items&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a good example of this in the Scripting Index, under the entry for&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CheckBoxBox&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Example",
	cb = Check Box(
		{"One", "Two", "Three"},
		Print( "Selected: " || Concat Items( cb &amp;lt;&amp;lt; Get Selected(), ", " ) )
	)
);
Wait( 2 );
cb &amp;lt;&amp;lt; Set Items( {"a", "Four", "Five", "Six"} );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Jul 2022 20:16:30 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-07-13T20:16:30Z</dc:date>
    <item>
      <title>How to call a function or process when checkbox is checked</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520953#M74640</link>
      <description>&lt;P&gt;I have a Panel Box with multiple checkboxes in it. I want to be able to add additional checkboxes to the panel when one checkbox is selected.&amp;nbsp; For instance when I check CbBox2, I want the entire HLBox1 to be added to the window. Is this possible in JSL? See code below:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;HLBox1 = H List Box(
		spacer Box(Size(20,20)),
		CbBox3 = Check Box( "Additional Option Only to Appear if CbBox2 is selected." );
		CbBox3 &amp;lt;&amp;lt; Set(0)
	);

GUIWindow1 = New Window("Preset Selections",
	PanelBox("Single option1, option 2, or Both",
	CbBox1 = Check Box( "Box 1 Option" ),
	CbBox2 = Check Box( "Box 2 Option" ),
	SpacerBox(Size(5,5)),
	
	CbBox1 &amp;lt;&amp;lt; set( 1 ), 
	CbBox2 &amp;lt;&amp;lt; set( 0 )
	),
	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:25:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520953#M74640</guid>
      <dc:creator>JMewborn</dc:creator>
      <dc:date>2023-06-11T11:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a function or process when checkbox is checked</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520970#M74641</link>
      <description>&lt;P&gt;You can associate an anonymous function when you call Check Box() to create the display box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;GUIWindow1 = New Window("Preset Selections",
	PanelBox("Single option1, option 2, or Both",
	CbBox1 = Check Box( "Box 1 Option",
		&amp;lt;&amp;lt; Set Function(
			Function( { cb }, { temp },
				temp = cb &amp;lt;&amp;lt; Get;
				// anything you need to do
			)
		)
	),
	CbBox2 = Check Box( "Box 2 Option" ),
	SpacerBox(Size(5,5)),
	
	CbBox1 &amp;lt;&amp;lt; set( 1 ), 
	CbBox2 &amp;lt;&amp;lt; set( 0 )
	)	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:23:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520970#M74641</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-07-13T19:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a function or process when checkbox is checked</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520973#M74642</link>
      <description>&lt;P&gt;Use the message&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; set items&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a good example of this in the Scripting Index, under the entry for&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CheckBoxBox&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Example",
	cb = Check Box(
		{"One", "Two", "Three"},
		Print( "Selected: " || Concat Items( cb &amp;lt;&amp;lt; Get Selected(), ", " ) )
	)
);
Wait( 2 );
cb &amp;lt;&amp;lt; Set Items( {"a", "Four", "Five", "Six"} );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 20:16:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-call-a-function-or-process-when-checkbox-is-checked/m-p/520973#M74642</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-13T20:16:30Z</dc:date>
    </item>
  </channel>
</rss>

