<?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 restore the color of a ListBox to its default? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-restore-the-color-of-a-ListBox-to-its-default/m-p/880114#M104375</link>
    <description>&lt;P&gt;To reset it set it to "None" and I'm not sure about changing the background.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;And when you are trying to figure out stuff like this, you can attempt to get the "default" value before changing it. In this you can use &amp;lt;&amp;lt; Get Background Color&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("Example", 
	lb = List Box({"single", "double", "triple"}, nlines(5))
);
def_color = lb &amp;lt;&amp;lt; Get Background Color();
show(def_color);

Wait(1);
lb &amp;lt;&amp;lt; background color("red");

Wait(1);
lb &amp;lt;&amp;lt; background color("None"); // after you have checked what it is 

// Or sometimes you might want to use
lb &amp;lt;&amp;lt; background color(def_color);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Jun 2025 05:27:40 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-06-17T05:27:40Z</dc:date>
    <item>
      <title>How to restore the color of a ListBox to its default?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-restore-the-color-of-a-ListBox-to-its-default/m-p/880103#M104374</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In the following JSL, after changing the color of the ListBox frame, how can I revert it to the default color? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, if I want to change the background color of the ListBox, how should I set it up? The command for changing the background color modifies the color of the frame.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Example",
	b = List Box( {"single", "double", "triple"}, nlines( 5 ) )
);
wait(2);
b&amp;lt;&amp;lt; background color("red");
wait(2);
//b&amp;lt;&amp;lt; background color("default color?");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 03:07:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-restore-the-color-of-a-ListBox-to-its-default/m-p/880103#M104374</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-06-17T03:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore the color of a ListBox to its default?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-restore-the-color-of-a-ListBox-to-its-default/m-p/880114#M104375</link>
      <description>&lt;P&gt;To reset it set it to "None" and I'm not sure about changing the background.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;And when you are trying to figure out stuff like this, you can attempt to get the "default" value before changing it. In this you can use &amp;lt;&amp;lt; Get Background Color&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("Example", 
	lb = List Box({"single", "double", "triple"}, nlines(5))
);
def_color = lb &amp;lt;&amp;lt; Get Background Color();
show(def_color);

Wait(1);
lb &amp;lt;&amp;lt; background color("red");

Wait(1);
lb &amp;lt;&amp;lt; background color("None"); // after you have checked what it is 

// Or sometimes you might want to use
lb &amp;lt;&amp;lt; background color(def_color);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jun 2025 05:27:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-restore-the-color-of-a-ListBox-to-its-default/m-p/880114#M104375</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-06-17T05:27:40Z</dc:date>
    </item>
  </channel>
</rss>

