<?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: Button color change when selecting/deselecting (toggle selection) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596749#M221009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update : Change color according to your need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Apr 2014 11:10:29 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-04-03T11:10:29Z</dc:date>
    <item>
      <title>Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596748#M221008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi All, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I want to change the color of a button depending on whether the button is activated or deactivated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;- Setting up a variable Button&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;- Set variable on Button Click (Variable = vbutton, Value = 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Then I set up a calculated button color:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vButton&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(20, 255, 8), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(247, 159, 8,)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;The result is, that the button color changes when selecting the button. So far so good. I want the button color to change back to the original color though when I am pressing the button again (which means "deselection" in my application, because I defined a toggle selection on button click as well).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;How can I do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks very much in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Rgds Stephan &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596748#M221008</guid>
      <dc:creator />
      <dc:date>2014-04-03T11:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596749#M221009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update : Change color according to your need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596749#M221009</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-03T11:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596750#M221010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the value in the action to the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(vButton = 0, 1, 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will toggle the button between 1 and 0. Your colour expression should work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596750#M221010</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-04-03T11:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596751#M221011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596751#M221011</guid>
      <dc:creator>nizamsha</dc:creator>
      <dc:date>2014-04-03T11:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596752#M221012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;set variable should be&lt;/P&gt;&lt;P&gt;=if(vButton=1,0,1) or as Jonathan suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and calculated color should be &lt;/P&gt;&lt;P&gt;If( vButton = 1, RGB(20, 255, 8), RGB(247, 159, 8))&lt;/P&gt;&lt;P&gt;instead of (removelastcomma) &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #808080;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;vButton&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = 1, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(20, 255, 8), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(247, 159, 8&lt;STRONG&gt;,&lt;/STRONG&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use an input box to check your variable&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56507_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596752#M221012</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-04-03T11:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596753#M221013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all, this really worked well - I was not aware of the 0,1,0 logic.&lt;/P&gt;&lt;P&gt;Bloody beginner me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596753#M221013</guid>
      <dc:creator />
      <dc:date>2014-04-03T11:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Button color change when selecting/deselecting (toggle selection)</title>
      <link>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596754#M221014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Follow these easy steps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a variable vChange and assign value to 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Select a button object and give proper name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the button properties&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; In general tab Color property-&amp;gt; Add calculated color expression : &lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vChange&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Green&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Red&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the Actions tab-&amp;gt; Add actions as Setvariable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Variable : vChange (without "=")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Value : =&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vChange&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=1,0,1) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Now click and see &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 11:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-color-change-when-selecting-deselecting-toggle-selection/m-p/596754#M221014</guid>
      <dc:creator />
      <dc:date>2014-04-03T11:37:43Z</dc:date>
    </item>
  </channel>
</rss>

