<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to use Bitmap Variable</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b40133b4b9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b40133b4b9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/b40133b4b9/</id><updated>2020-02-27T19:07:33.607000Z</updated><subtitle>Recent posts to How to use Bitmap Variable</subtitle><entry><title>How to use Bitmap Variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b40133b4b9/?limit=25#22ce" rel="alternate"/><published>2020-02-27T19:07:33.607000Z</published><updated>2020-02-27T19:07:33.607000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com96c25548b54afa2526fae14681876db8aa0eff71</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;easier is to have two buttons on top of each other and make them invisible.&lt;br/&gt;
it just changes the color and there is no need to load the bitmap each time.&lt;br/&gt;
you also can change the color etc.&lt;br/&gt;
this will work in java so also on html visualisations.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use Bitmap Variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b40133b4b9/?limit=25#5225" rel="alternate"/><published>2020-02-27T19:07:32.408000Z</published><updated>2020-02-27T19:07:32.408000Z</updated><author><name>esbucy</name><uri>https://forge.codesys.com/u/esbucy/</uri></author><id>https://forge.codesys.comcbed039e84f8c33458667e5b88051ce5233c8119</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I figured out a way to do it (whether or not it is the best, I doubt).&lt;br/&gt;
. I create a  for each bitmap.&lt;br/&gt;
. I create a  for each button.&lt;br/&gt;
. I configure the  to be the var in step 2.&lt;br/&gt;
. I configure the  to ""&lt;br/&gt;
This implementation does not handle the button press (equivalent of mouse down).&lt;/p&gt;
&lt;p&gt;I created this topic, because I had been receiving an error:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt; &lt;span class="mi"&gt;4001&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;__PLC_VISUE_CYCLECODE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="n"&gt;Identifier&lt;/span&gt; &lt;span class="s1"&gt;'DRAWBITMAPBYSTRING'&lt;/span&gt; &lt;span class="k"&gt;not&lt;/span&gt; &lt;span class="k"&gt;defined&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;As it turns out, it appears to be a target specific error. I tested this method out on a Target &lt;strong&gt;none&lt;/strong&gt; and had no problems, as well as an &lt;strong&gt;ifm CR0032&lt;/strong&gt;. When I switched to a &lt;strong&gt;ccPilot&lt;/strong&gt; target, that is when the error pops up.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to use Bitmap Variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/b40133b4b9/?limit=25#76d9" rel="alternate"/><published>2020-02-27T19:07:29.079000Z</published><updated>2020-02-27T19:07:29.079000Z</updated><author><name>esbucy</name><uri>https://forge.codesys.com/u/esbucy/</uri></author><id>https://forge.codesys.com4af4e5da94469f310708ca976d61dd2f49f7e657</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;What I'm trying to do is use bitmaps as buttons in a visualization for navigation. When the user presses a button the bitmap should change to a different image that makes it look like the button is being pressed. Then after the button is selected and the application has navigated to a different screen, the bitmap should be a different image to show the current page we're on.&lt;/p&gt;
&lt;p&gt;I'm used to creating UI's where there is some sort of event driven feature to use in order to do what I'm trying. CoDeSys seems to have this  to configure, but I cannot seem to figure it out despite the documentation.&lt;/p&gt;
&lt;p&gt;I've read the help on the subject, where it suggests using the CASE statement, but do not know what the  variable is referring to. I noticed the Programmability tab and tried a few different things in there, but no luck.&lt;/p&gt;
&lt;p&gt;Are there any tutorials showing how to setup a bitmap to use different bitmaps? Has anyone done something similar?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>