<?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: Change color and underline contents of a string col box or table box. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484912#M72901</link>
    <description>&lt;P&gt;Thanks Jarmo. It definitely looks better, though there is the downside of not being able to right click and 'make into data table', but I don't think that feature is that important.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had typed these two questions here, but I just answered them for myself...&amp;nbsp; What code is changing the text to blue?&amp;nbsp; And why do the button boxes appear as text only and not the usual buttons we see like the 'back' to top examples here?&amp;nbsp; The answer is your &amp;lt;&amp;lt; Underline Style(1); does both of these things. Seems it is an alternate display of the button box. Thanks for sharing, I didn't know about that.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 May 2022 20:14:48 GMT</pubDate>
    <dc:creator>mikedriscoll</dc:creator>
    <dc:date>2022-05-06T20:14:48Z</dc:date>
    <item>
      <title>Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484851#M72897</link>
      <description>&lt;P&gt;Hi, I posted a similar version of the code below last week, and now I'm trying to update the values in the string col box() / table box() to be blue and underlined so they appear to be hyperlinks. The table box &amp;lt;&amp;lt; text color() command was not working for me, but the string col box &amp;lt;&amp;lt; text color() works. Is there a way to do this so the header of the column, "names" in the example below, does not change color?&amp;nbsp; Is there a way to set the values to be underlined?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

//dummy data table
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

// create a list of columns. In the example table, the first 4 columns are categorical index columns, so we'll use 20 columns starting at column 5 (4 + i)
colList = {};
for( i = 1, i&amp;lt;=20, i++,
	colList[i] = as column(dt, 4 + i) &amp;lt;&amp;lt; get name();
);

// new window, table box with selectable rows
nw = New Window( "Example",
	vlb = vlistbox(
		mainOlb = Outline Box( "Table", // used for referencing scrolling back to top
			tb = Table Box(
				scb = String Col Box( "names", colList ),  // scb will be used later to color in blue to indicate it is a pseudo-hyperlink
				&amp;lt;&amp;lt;set selectable rows() // making the rows selectable is how we can capture that row selection has changed, and the &amp;lt;&amp;lt;set row change function() will scroll to the corresponding distribution
			)
		)
	);
);

scb &amp;lt;&amp;lt; text color(rgb color(0,0,255)); // any way to set it so only the values are blue, and not the header, 'names' in this case? 
scb &amp;lt;&amp;lt; set underline(1); // not a real command

//append some distributions in their own context boxes, but keep a reference variable for the conext box cb[i].
cb = {};
for( i = 1, i &amp;lt;= 20, i++,
	vlb &amp;lt;&amp;lt;  append(
		cb[i] = contextbox(
			distribution(column(4 + i)) // put the i'th distribution in context box[i]
		)
	);
	vlb&amp;lt;&amp;lt;append(buttonbox("Back", nw &amp;lt;&amp;lt; scroll window(mainOlb))); //back to top
);

//set what happens when a row is selected. itemNum is a matrix of all selected rows.
//	The 'this' variable here explained:  When a row is selected, the set row change function(x) is called. The input variable x is copy of the table box. So 'this' refers to a copy of the table box. 
//  'this &amp;lt;&amp;lt; get selected rows()' just returns a matrix of the selected rows. Since we can't set max # of rows selected, we just use the first.
tb &amp;lt;&amp;lt; set row change function(
	Function( {this},
		Print( this &amp;lt;&amp;lt; get selected rows );
		itemNum = this &amp;lt;&amp;lt; get selected rows();
		if(nrows(itemNum) &amp;gt; 0,
			nw &amp;lt;&amp;lt; scroll window(cb[itemNum[1]]);
		);
	)
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;JMP standard version 16.2.0&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:58:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484851#M72897</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2023-06-09T16:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484890#M72898</link>
      <description>&lt;P&gt;You could maybe use Col Box instead of String Col Box and use button boxes in col box&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

//dummy data table
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

// create a list of columns. In the example table, the first 4 columns are categorical index columns, so we'll use 20 columns starting at column 5 (4 + i)
colList = {};
for( i = 1, i&amp;lt;=20, i++,
	colList[i] = as column(dt, 4 + i) &amp;lt;&amp;lt; get name();
);

// new window, table box with selectable rows
nw = New Window( "Example",
	vlb = vlistbox(
		mainOlb = Outline Box( "Table", // used for referencing scrolling back to top
			tb = Table Box(
				scb = Col Box( "names", {}),  // scb will be used later to color in blue to indicate it is a pseudo-hyperlink
			)
		)
	);
);

For Each({col}, colList,
	scb &amp;lt;&amp;lt; Append(Button Box(col, &amp;lt;&amp;lt; Set Function(function({this},
			nw &amp;lt;&amp;lt; scroll window(cb[Contains(colList, this &amp;lt;&amp;lt; Get Button Name)]);
		)), &amp;lt;&amp;lt; Underline Style(1);
	));
);

//append some distributions in their own context boxes, but keep a reference variable for the conext box cb[i].
cb = {};
for( i = 1, i &amp;lt;= 20, i++,
	vlb &amp;lt;&amp;lt;  append(
		cb[i] = contextbox(
			distribution(column(4 + i)) // put the i'th distribution in context box[i]
		)
	);
	vlb&amp;lt;&amp;lt;append(buttonbox("Back", nw &amp;lt;&amp;lt; scroll window(mainOlb))); //back to top
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 May 2022 19:10:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484890#M72898</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-06T19:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484912#M72901</link>
      <description>&lt;P&gt;Thanks Jarmo. It definitely looks better, though there is the downside of not being able to right click and 'make into data table', but I don't think that feature is that important.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had typed these two questions here, but I just answered them for myself...&amp;nbsp; What code is changing the text to blue?&amp;nbsp; And why do the button boxes appear as text only and not the usual buttons we see like the 'back' to top examples here?&amp;nbsp; The answer is your &amp;lt;&amp;lt; Underline Style(1); does both of these things. Seems it is an alternate display of the button box. Thanks for sharing, I didn't know about that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 20:14:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484912#M72901</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2022-05-06T20:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484941#M72908</link>
      <description>&lt;P&gt;There are also some other downsides on using col box, for example more difficult to get values from, sometimes you can crash JMP when building Col Box... but I don't know of any simple means of changing String Col Box title color besides &amp;lt;&amp;lt;Text Color which will change color of all elements.&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 06:19:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/484941#M72908</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-07T06:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/485204#M72926</link>
      <description>&lt;P&gt;Can you elaborate further on the part about JMP crashing?&amp;nbsp; Is it predictable, or does it happen with a large number of items in a col box()?&amp;nbsp; I'd probably want to avoid this in many cases, as it is likely to be used in scripts where any number of parameters may be plotted. Anywhere from a few plots to a thousand or so.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 15:03:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/485204#M72926</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2022-05-09T15:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486298#M73029</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;, sorry to bother you, but I was hoping you or maybe someone from the JMP team could elaborate further on the part about JMP crashing when building a col box. Any tips on how to avoid that sort of behavior?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 14:58:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486298#M73029</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2022-05-12T14:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486301#M73032</link>
      <description>&lt;P&gt;You should be able to avoid the crashes by building Col Box "correctly". If I remember correctly &amp;lt;&amp;lt; append has worked for me, but you cannot use &amp;lt;&amp;lt; Set.&amp;nbsp;I have contacted support about that sometime ago. Issue is supposed to be fixed on JMP17. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My example I provided them with was this (&lt;STRONG&gt;THIS WILL CRASH JMP16):&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE width="100"&gt;Names Default To Here(1);&lt;BR /&gt;stop(); // THIS WILL CRASH JMP
nw = New WindoW("",
       Table Box(
              cb = Col Box("icons",
                     Icon Box("Excluded"),
                     Icon Box("Excluded"),
              )
       )
);

cb &amp;lt;&amp;lt; Set({"a", "b"});&lt;/PRE&gt;
&lt;P&gt;So if I were to use Col Box and wanted to replace value, I would always just rebuild it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 15:09:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486301#M73032</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-12T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486326#M73035</link>
      <description>&lt;P&gt;Thanks very much Jarmo.&amp;nbsp; I appreciate the help and insight on the behavior.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 15:49:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486326#M73035</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2022-05-12T15:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486469#M73042</link>
      <description>&lt;P&gt;Justin Chilton and I gave a talk that included col boxes at the Discovery 2018 Summit.&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Supercharge Your User Interfaces in JSL ( US 2018 113 )" uid="73744" url="https://community.jmp.com/t5/Discovery-Summit-2018/Supercharge-Your-User-Interfaces-in-JSL-US-2018-113/m-p/73744#U73744" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 21:10:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486469#M73042</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-05-12T21:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change color and underline contents of a string col box or table box.</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486776#M73062</link>
      <description>&lt;P&gt;Thank you Peter. That was a great presentation, and it was very helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 17:02:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-and-underline-contents-of-a-string-col-box-or-table/m-p/486776#M73062</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2022-05-13T17:02:16Z</dc:date>
    </item>
  </channel>
</rss>

