<?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 Enable button box after pressing enter at a Number edit box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797767#M97362</link>
    <description>&lt;P&gt;I have the following window:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georgios_Tsim_0-1726052987810.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68134i611522296E35515E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georgios_Tsim_0-1726052987810.png" alt="Georgios_Tsim_0-1726052987810.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I am trying to do is to enable the 'Select data to import' button after pressing enter at the Number Edit window above.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;docId = "xxxxxx";
WidthDescripWin = 500;
init_value =31;



win = New Window("Landing page for study evaluation add-in",
	&amp;lt;&amp;lt;On close(EndAddin()),
	&amp;lt;&amp;lt; Padding( {Left( 10 ), Top( 10 ), Right( 10 ), Bottom( 10 )} ),

	// Construction of landing page. From here data is imported and analysis initiated
	H Center Box(promptTitle = Text Box("Compat study evaluation")),
	Spacer Box(Size(10,10)),
	//H Center Box(promptV = Text Box("Add-in version: " || substitute(char(format(addin_version, "Fixed Dec", 1)),",","."))),
	H Center Box(promptV = Text Box("Add-in version: 0.2" )),
	H Center Box(promptDoc = Text Box("Documentation report: " || char(docId))),
	Spacer Box(Size(10,10)),
	Panel Box("Description of Add-in:",
		Text Box("This add-in has been created to ease and standardize the statistical analysis of data coming from" || 
			" compatibility studies. The general structure of compatiblity studies is an comparison of parameter developments" || 
			" for samples impacted by a given influence of interest and corresponding reference samples.", &amp;lt;&amp;lt;set width(WidthDescripWin))
	),
	Spacer Box(Size(10,10)),
	Panel Box( "Data selection for analysis. Please follow the instructions:",
		Text Box("The data file is expected to be a standard pull from *****. Thus the file should have a sheet named" ||
				" Details. \!N   \!NPlease follow the instructions\!N1) Please input the row number containing the column names"||
				" and press Enter.\!N2)Once the button 'Select data to import' is enabled, click on it and select your dataset." ||
				" \!N3) Click 'Run analysis' to continue", &amp;lt;&amp;lt;set width(WidthDescripWin)
		),
		Spacer Box(Size(10,10)),
        H Center Box(Lineup Box( NCol(2),
			Text Box("Enter the Row Number of the Column Names"),
                    row_no = Number Edit Box(init_value, &amp;lt;&amp;lt; Set Function(Function({this}, init_value = this &amp;lt;&amp;lt; get; enter_row_start();)));
                    
        	
			),
		),		
        Spacer Box(Size(10,10)),
		H Center Box( 
            H List Box(
			    bboxImp = button box( "Select data to import", importData()), // Importing data
			    Spacer Box(Size(10,10)),
			    bboxRe = button box( "Remove imported data", importRedo()), // Allow for reimport data
		    ),
        ),
	Spacer Box(Size(10,10)),
	H Center Box( 
        H List Box(
		    bboxAn = button box("Run analysis", compatStudyEval()), // Perform analysis
		    Spacer Box(Size(10,10)),
		    bboxEnd = button box("End analysis", endAddin()) // Close landing page for add-in
	    ),
    ),
    
    	
  ),
    
);

// Change font in landing page window
promptTitle &amp;lt;&amp;lt; Font("Times New Roman", 14, "Bold");
promptV &amp;lt;&amp;lt; Font("Times New Roman", 10, "Bold");
promptDoc &amp;lt;&amp;lt; Font("Times New Roman", 10, "Bold");

bboxRe &amp;lt;&amp;lt; enable(0);
bboxAn &amp;lt;&amp;lt; enable(0);
bboxImp &amp;lt;&amp;lt; enable(0);


// ----------------------------------------
// ----- STEP 3: FUNCTION DEFINITIONS -----
// ----------------------------------------


enter_row_start = Function({},
	
	bboxImp &amp;lt;&amp;lt; enable(1);
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the way that I am trying to do that without success is using the following piece of code:&lt;/P&gt;&lt;P&gt;where the&amp;nbsp;enter_row_start() function just has the enable command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do that?&lt;BR /&gt;what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2024 13:36:31 GMT</pubDate>
    <dc:creator>Georgios_Tsim</dc:creator>
    <dc:date>2024-09-11T13:36:31Z</dc:date>
    <item>
      <title>Enable button box after pressing enter at a Number edit box</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797767#M97362</link>
      <description>&lt;P&gt;I have the following window:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georgios_Tsim_0-1726052987810.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68134i611522296E35515E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georgios_Tsim_0-1726052987810.png" alt="Georgios_Tsim_0-1726052987810.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I am trying to do is to enable the 'Select data to import' button after pressing enter at the Number Edit window above.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;docId = "xxxxxx";
WidthDescripWin = 500;
init_value =31;



win = New Window("Landing page for study evaluation add-in",
	&amp;lt;&amp;lt;On close(EndAddin()),
	&amp;lt;&amp;lt; Padding( {Left( 10 ), Top( 10 ), Right( 10 ), Bottom( 10 )} ),

	// Construction of landing page. From here data is imported and analysis initiated
	H Center Box(promptTitle = Text Box("Compat study evaluation")),
	Spacer Box(Size(10,10)),
	//H Center Box(promptV = Text Box("Add-in version: " || substitute(char(format(addin_version, "Fixed Dec", 1)),",","."))),
	H Center Box(promptV = Text Box("Add-in version: 0.2" )),
	H Center Box(promptDoc = Text Box("Documentation report: " || char(docId))),
	Spacer Box(Size(10,10)),
	Panel Box("Description of Add-in:",
		Text Box("This add-in has been created to ease and standardize the statistical analysis of data coming from" || 
			" compatibility studies. The general structure of compatiblity studies is an comparison of parameter developments" || 
			" for samples impacted by a given influence of interest and corresponding reference samples.", &amp;lt;&amp;lt;set width(WidthDescripWin))
	),
	Spacer Box(Size(10,10)),
	Panel Box( "Data selection for analysis. Please follow the instructions:",
		Text Box("The data file is expected to be a standard pull from *****. Thus the file should have a sheet named" ||
				" Details. \!N   \!NPlease follow the instructions\!N1) Please input the row number containing the column names"||
				" and press Enter.\!N2)Once the button 'Select data to import' is enabled, click on it and select your dataset." ||
				" \!N3) Click 'Run analysis' to continue", &amp;lt;&amp;lt;set width(WidthDescripWin)
		),
		Spacer Box(Size(10,10)),
        H Center Box(Lineup Box( NCol(2),
			Text Box("Enter the Row Number of the Column Names"),
                    row_no = Number Edit Box(init_value, &amp;lt;&amp;lt; Set Function(Function({this}, init_value = this &amp;lt;&amp;lt; get; enter_row_start();)));
                    
        	
			),
		),		
        Spacer Box(Size(10,10)),
		H Center Box( 
            H List Box(
			    bboxImp = button box( "Select data to import", importData()), // Importing data
			    Spacer Box(Size(10,10)),
			    bboxRe = button box( "Remove imported data", importRedo()), // Allow for reimport data
		    ),
        ),
	Spacer Box(Size(10,10)),
	H Center Box( 
        H List Box(
		    bboxAn = button box("Run analysis", compatStudyEval()), // Perform analysis
		    Spacer Box(Size(10,10)),
		    bboxEnd = button box("End analysis", endAddin()) // Close landing page for add-in
	    ),
    ),
    
    	
  ),
    
);

// Change font in landing page window
promptTitle &amp;lt;&amp;lt; Font("Times New Roman", 14, "Bold");
promptV &amp;lt;&amp;lt; Font("Times New Roman", 10, "Bold");
promptDoc &amp;lt;&amp;lt; Font("Times New Roman", 10, "Bold");

bboxRe &amp;lt;&amp;lt; enable(0);
bboxAn &amp;lt;&amp;lt; enable(0);
bboxImp &amp;lt;&amp;lt; enable(0);


// ----------------------------------------
// ----- STEP 3: FUNCTION DEFINITIONS -----
// ----------------------------------------


enter_row_start = Function({},
	
	bboxImp &amp;lt;&amp;lt; enable(1);
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the way that I am trying to do that without success is using the following piece of code:&lt;/P&gt;&lt;P&gt;where the&amp;nbsp;enter_row_start() function just has the enable command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do that?&lt;BR /&gt;what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 13:36:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797767#M97362</guid>
      <dc:creator>Georgios_Tsim</dc:creator>
      <dc:date>2024-09-11T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Enable button box after pressing enter at a Number edit box</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797807#M97364</link>
      <description>&lt;P&gt;Include this expression in the function you defined for the number column box.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;bboxImp &amp;lt;&amp;lt; Enable( 1 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2024 12:39:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797807#M97364</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-09-11T12:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Enable button box after pressing enter at a Number edit box</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797833#M97368</link>
      <description>&lt;P&gt;I believe that Mark was referring to the "Number Edit Box" not a "Number Column Box".&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 13:21:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797833#M97368</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-09-11T13:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Enable button box after pressing enter at a Number edit box</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797958#M97383</link>
      <description>&lt;P&gt;You are on the right track. You just need to check the value of the number edit box as part of the function. Here is a simple example that you can apply to your script. The function below will also disable the button if the number edit box goes back to a missing value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here( 1 );

nw = new window( "Test Window",
	panel box( "Instructions",
		text box( "1. Input number \!r2. Press Enter \!r3. Press Run Analysis" )
	),
	panel box( "Data Entry",
		h list box( 
			text box( "enter a number and hit Enter on your keyboard" ),
			NEB = number edit box( ., &amp;lt;&amp;lt; set function( 
				function( { thisBox }, 
					if( 
						!is missing( thisBox &amp;lt;&amp;lt; get ), bb1 &amp;lt;&amp;lt; enable(1),
						is missing( thisBox &amp;lt;&amp;lt; get ), bb1 &amp;lt;&amp;lt; enable(0)
					)
				)
			))	
		)
	),
	panel box( "Actions", 
		h list box( 
			bb1 = button box( "Run Analysis" ),
			button box( "End Analysis" )
		)
	)
);

bb1 &amp;lt;&amp;lt; enable( 0 )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2024 17:57:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-button-box-after-pressing-enter-at-a-Number-edit-box/m-p/797958#M97383</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2024-09-11T17:57:09Z</dc:date>
    </item>
  </channel>
</rss>

