<?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: Enable Calendar Icon in Number Col Edit Box? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362032#M61168</link>
    <description>&lt;P&gt;Pete,&lt;/P&gt;
&lt;P&gt;Here is the method that I have used many many times.&amp;nbsp; It is a little wordy but it ends up with a nice list of values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
nw = New Window( "Test Colboxes",
	tb = Table Box(
		String Col Box( "String", {"One", "Two"} ),
		date_nceb = Number Col Edit Box( "Dates", {1, 2} ),
		cb = Col Box( "Combo boxes" ), 

	),
	Button Box( "OK",
		cb_list = cb &amp;lt;&amp;lt; get;
		Print( cb_list, N Items( cb_list ) );
	)
);
valList = {};
i = 1;
Eval(
	Parse(
		"cb &amp;lt;&amp;lt; append(cb" || Char( i ) || " = combo box({\!"ABC\!", \!"DEF\!"}, vallist[" || Char( i ) || "] = cb" || Char( i ) ||
		" &amp;lt;&amp;lt; get selected  ));"
	)
);
i++;
Eval(
	Parse(
		"cb &amp;lt;&amp;lt; append(cb" || Char( i ) || " = combo box({\!"GHI\!", \!"FUBAR\!"}, vallist[" || Char( i ) || "] = cb" || Char( i ) ||
		" &amp;lt;&amp;lt; get selected  ));"
	)
);
For( k = 1, k &amp;lt;= i, k++, valList[k] = "" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Feb 2021 03:38:16 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-02-24T03:38:16Z</dc:date>
    <item>
      <title>Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361863#M61154</link>
      <description>&lt;P&gt;I'm creating a tablebox with a number col edit box that will show the date.&amp;nbsp; However even if I set the format properly the calendar icon doesn't show up.&amp;nbsp; Here's an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = new window("Test Calendar",
	neb = number edit box(),
	tb = table box(
		string col box("String", {"One", "Two"}),
		date_nceb = number col edit box("Dates", {., .})
	)
);

neb &amp;lt;&amp;lt; Set Format( Format( "ddMonyyyy", 12 ) );
date_nceb &amp;lt;&amp;lt; Set Format( Format( "ddMonyyyy", 12 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1614095964025.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30639i938027727CDB4596/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1614095964025.png" alt="pmroz_0-1614095964025.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see for the number edit box the calendar icon shows up properly.&amp;nbsp; Nothing for the Dates column though.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:06:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361863#M61154</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2023-06-09T22:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361885#M61155</link>
      <description>&lt;P&gt;Could it be that Number Col Edit Box doesn't support calendar formatting (yet)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe as possible workaround you could use Col Box (dealing with the values might be a bit more annoying).&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
nw = new window("Test Calendar",
	neb = number edit box(),
	tb = table box(
		string col box("String", {"One", "Two"}),
		Col Box("Dates",
			neb1 = Number edit box(.),
			neb2 = Number edit box(.),
		)
	)
);

neb &amp;lt;&amp;lt; Set Format( Format( "ddMonyyyy", 12 ) );
neb1 &amp;lt;&amp;lt; Set Format( Format( "ddMonyyyy", 12 ) );
neb2 &amp;lt;&amp;lt; Set Format( Format( "ddMonyyyy", 12 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Feb 2021 16:39:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361885#M61155</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-02-23T16:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361936#M61162</link>
      <description>&lt;P&gt;I ended up using col boxes like you suggested.&amp;nbsp; More overhead but it works.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 19:15:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/361936#M61162</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2021-02-23T19:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362007#M61166</link>
      <description>&lt;P&gt;New question related to the above.&amp;nbsp; I'm creating a col box containing combo boxes, and need to loop over them getting the selected value for each combo box.&amp;nbsp; However there doesn't seem to be a method to doing this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
nw = new window("Test Colboxes",
	tb = table box(
		string col box("String", {"One", "Two"}),
		date_nceb = number col edit box("Dates", {1, 2}),
		cb = col box("Combo boxes"),
	),
	button box("OK",
		cb_list = cb &amp;lt;&amp;lt; get;
		print(cb_list, nitems(cb_list));
	)
);

cb &amp;lt;&amp;lt; append(combo box({"ABC", "DEF"}));
cb &amp;lt;&amp;lt; append(combo box({"GHI", "FUBAR"}));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1614120481415.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30644i8BDCC858135745BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1614120481415.png" alt="pmroz_0-1614120481415.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Clicking OK shows this in the log:&lt;/P&gt;
&lt;PRE&gt;{"", ""}
2&lt;/PRE&gt;
&lt;P&gt;I want to get the list of combo boxes.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 22:48:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362007#M61166</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2021-02-23T22:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362032#M61168</link>
      <description>&lt;P&gt;Pete,&lt;/P&gt;
&lt;P&gt;Here is the method that I have used many many times.&amp;nbsp; It is a little wordy but it ends up with a nice list of values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
nw = New Window( "Test Colboxes",
	tb = Table Box(
		String Col Box( "String", {"One", "Two"} ),
		date_nceb = Number Col Edit Box( "Dates", {1, 2} ),
		cb = Col Box( "Combo boxes" ), 

	),
	Button Box( "OK",
		cb_list = cb &amp;lt;&amp;lt; get;
		Print( cb_list, N Items( cb_list ) );
	)
);
valList = {};
i = 1;
Eval(
	Parse(
		"cb &amp;lt;&amp;lt; append(cb" || Char( i ) || " = combo box({\!"ABC\!", \!"DEF\!"}, vallist[" || Char( i ) || "] = cb" || Char( i ) ||
		" &amp;lt;&amp;lt; get selected  ));"
	)
);
i++;
Eval(
	Parse(
		"cb &amp;lt;&amp;lt; append(cb" || Char( i ) || " = combo box({\!"GHI\!", \!"FUBAR\!"}, vallist[" || Char( i ) || "] = cb" || Char( i ) ||
		" &amp;lt;&amp;lt; get selected  ));"
	)
);
For( k = 1, k &amp;lt;= i, k++, valList[k] = "" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2021 03:38:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362032#M61168</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-24T03:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362043#M61172</link>
      <description>&lt;P&gt;If you want to get selected values from ComboBoxes inside Table Box, I would maybe try with XPath:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
nw = new window("Test Colboxes",
	tb = table box(
		string col box("String", {"One", "Two"}),
		date_nceb = number col edit box("Dates", {1, 2}),
		cb = col box("Combo boxes"),
	),
	button box("OK",
		cb_list = cb &amp;lt;&amp;lt; XPath("//ComboBoxItem[@selectedItem=\!"true\!"]/text()");
		print(cb_list, nitems(cb_list));
	)
);

cb &amp;lt;&amp;lt; append(combo box({"ABC", "DEF"}));
cb &amp;lt;&amp;lt; append(combo box({"GHI", "FUBAR"}));

//Show(tb &amp;lt;&amp;lt; get xml);
//Show(cb &amp;lt;&amp;lt; get xml);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have found that from time to time with New Window it is easier to get the values by using XPath. I start the by first checking how the XML looks like with &amp;lt;&amp;lt; Get Xml as it shows what I can get with XPath. After that I start googling how to get what I want (attributes, values, filtering...) out of the XML by using XPath.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 05:54:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362043#M61172</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-02-24T05:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Calendar Icon in Number Col Edit Box?</title>
      <link>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362121#M61180</link>
      <description>&lt;P&gt;Excellent solution!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest the following modification to the XPath statement.&amp;nbsp; It stays closer to JSL methodology and would not require the investigation of the XML structure to set the specific syntax.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cb_list = (cb &amp;lt;&amp;lt; XPath("//ComboBox")) &amp;lt;&amp;lt; get selected;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2021 11:57:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Enable-Calendar-Icon-in-Number-Col-Edit-Box/m-p/362121#M61180</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-24T11:57:37Z</dc:date>
    </item>
  </channel>
</rss>

