<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Images in panels - load and unload]]></title><description><![CDATA[<p dir="auto">Does anyone have a clear idea how these work?</p>
<p dir="auto">I want to use a set of panels, each with a single image loaded....</p>
<p dir="auto">I want that image to change based upon a mouse click in the panel....</p>
<p dir="auto">I tried load and unload, and on anything past the init callback then I get nothing loaded into my panels....</p>
<p dir="auto">So on init:   the panels have no image, and I run a load - and they display correctly...<br />
On mouse click: I run an unload on each one, then another load a few lines later - and here I get no images loaded...</p>
<p dir="auto">What am I doing wrong?</p>
]]></description><link>https://forum.hise.audio/topic/14607/images-in-panels-load-and-unload</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 19:30:59 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14607.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Apr 2026 11:38:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:14:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> ohh</p>
<p dir="auto">"height": undefined   &lt;---whata dumb ass....</p>
]]></description><link>https://forum.hise.audio/post/119339</link><guid isPermaLink="true">https://forum.hise.audio/post/119339</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:14:51 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:12:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> look at this!</p>
<p dir="auto"><img src="/assets/uploads/files/1775661138128-b784e504-f37a-45ac-9472-0f0164027a3f-image.png" alt="b784e504-f37a-45ac-9472-0f0164027a3f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">everything says its there - but its not displaying...</p>
]]></description><link>https://forum.hise.audio/post/119338</link><guid isPermaLink="true">https://forum.hise.audio/post/119338</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:10:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> said in <a href="/post/119336">Images in panels - load and unload</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> literally nothing is working now...I've broken it somehow...</p>
</blockquote>
<p dir="auto">You'll figure it out <img src="https://forum.hise.audio/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f64f-1f3fb.png?v=fba14f4754a" class="not-responsive emoji emoji-emoji-one emoji--folded_hands_light_skin_tone" style="height:23px;width:auto;vertical-align:middle" title=":folded_hands_light_skin_tone:" alt="🙏🏻" /></p>
]]></description><link>https://forum.hise.audio/post/119337</link><guid isPermaLink="true">https://forum.hise.audio/post/119337</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:10:43 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:09:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> literally nothing is working now...I've broken it somehow...</p>
]]></description><link>https://forum.hise.audio/post/119336</link><guid isPermaLink="true">https://forum.hise.audio/post/119336</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:09:27 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:08:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> well actually no paint routines trigger at all and no panel will show up even if I've commented out all teh paint routines...</p>
]]></description><link>https://forum.hise.audio/post/119335</link><guid isPermaLink="true">https://forum.hise.audio/post/119335</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:08:33 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:07:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> yes</p>
]]></description><link>https://forum.hise.audio/post/119334</link><guid isPermaLink="true">https://forum.hise.audio/post/119334</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:07:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> do paint routines trigger for hidden panels?</p>
]]></description><link>https://forum.hise.audio/post/119333</link><guid isPermaLink="true">https://forum.hise.audio/post/119333</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:07:38 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 15:00:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> now even this isnt working:</p>
<pre><code>for(i = 0; i &lt;NUM_individualLibPanels; i++)
{
	individualLibraryPanels[i] = Content.addPanel("iLibPanel" + (i+1), 0, 0);
	Content.setPropertiesFromJSON("iLibPanel" + (i+1),  {
    "type": "ScriptPanel",
    "x": 1.0,
    "y": 0.0,
    "parentComponent": "LibraryDisplayPanel",
    "width": 275.0,
    "height": LIB_PANEL_HEIGHT,
    "borderSize": 1.0,
    "borderRadius": 0.0
  });
  individualLibraryPanels[i].showControl(false);
  individualLibraryPanels[i].setPaintRoutine(function(g)
  {
  	Console.print("painting painting");
  });
};
</code></pre>
]]></description><link>https://forum.hise.audio/post/119332</link><guid isPermaLink="true">https://forum.hise.audio/post/119332</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:00:46 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 14:15:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a></p>
<p dir="auto">Working here. Try this. <a href="/assets/uploads/files/1775657742967-imageloadtest.zip">ImageLoadTest.zip</a></p>
<p dir="auto"><img src="/assets/uploads/files/1775657750258-peek-2026-04-08-15-14.gif" alt="Peek 2026-04-08 15-14.gif" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.hise.audio/post/119329</link><guid isPermaLink="true">https://forum.hise.audio/post/119329</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 14:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 14:02:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> except this doesnt work!!!!</p>
<p dir="auto">It always draws the first image you loaded......</p>
]]></description><link>https://forum.hise.audio/post/119328</link><guid isPermaLink="true">https://forum.hise.audio/post/119328</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 14:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 13:33:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> I wouldn't load the images in the paint routine, I'm not sure if there's an efficiency hit but it doesn't feel like the right approach.</p>
<p dir="auto">Let's say we have 3 images, <code>img1.png</code>, <code>img2.png</code>, <code>img3.png</code></p>
<p dir="auto">In on init we can load them into the panel.</p>
<pre><code>myPanel.loadImage("{PROJECT_FOLDER}img1.png", "img1");
myPanel.loadImage("{PROJECT_FOLDER}img2.png", "img2");
myPanel.loadImage("{PROJECT_FOLDER}img3.png", "img3");
</code></pre>
<p dir="auto">Then in the paint routine we can select the image to draw using its name (which you can get from your json object)</p>
<pre><code>var image = "img1"; //Get from your json object
g.drawImage(image, area, 0, 0);
</code></pre>
]]></description><link>https://forum.hise.audio/post/119325</link><guid isPermaLink="true">https://forum.hise.audio/post/119325</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 13:33:07 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 13:07:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> sadly its a bit of a monster...</p>
<p dir="auto">Here's a paint routine:</p>
<pre><code>function paintLibraries(g)
{
	panelValue = this.getValue();
	//Console.print(trace(panelValue));
	Console.print("trying to draw:" + panelValue.LibImage);
	
	templibImg = imageDirFile.getChildFile(panelValue.LibImage);
	this.loadImage(templibImg.toString(templibImg.FullPath), panelValue.LibImage);
	g.drawImage(panelValue.LibImage, [0,0,this.get("width"),this.get("height")], 0, 0);
	//draw edgeing in black
	g.setColour(Colours.black);
	g.drawRect([0,0,this.get("width"),this.get("height")],1);
	//draw the icon for opened or closed...
	g.setColour(Colours.white);
	if (panelValue.DisplayState == 0)
	{
		//not opened
		g.fillPath(paths.icons.PointRight, [this.get("width")-20,this.get("height")-30,15,25]);
	}else{
		//opened..
		g.rotate(radianFromDegree*90,[this.getWidth()-10,this.getHeight()-15]);
		g.fillPath(paths.icons.PointRight, [this.get("width")-15,this.get("height")-20,12,22]);
	};
};
</code></pre>
<p dir="auto">As you can see each panel has a json object in its value and it uses this to decide which image to load....</p>
<p dir="auto">Thinking about doing this a completely different way.. and fixing panels to thier owning JSON, not loading the json into the panel...</p>
]]></description><link>https://forum.hise.audio/post/119322</link><guid isPermaLink="true">https://forum.hise.audio/post/119322</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 13:07:59 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 13:03:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> Can you share the paint routine or a minimal snippet?</p>
]]></description><link>https://forum.hise.audio/post/119321</link><guid isPermaLink="true">https://forum.hise.audio/post/119321</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 13:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 13:03:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> thats more or less what Im doing, but the paint routine isnt drawing what I want -despite me asking politely... its drawing the first image loaded into the panel....</p>
]]></description><link>https://forum.hise.audio/post/119320</link><guid isPermaLink="true">https://forum.hise.audio/post/119320</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 13:03:27 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 12:05:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> Load all the images into the panel within on init. Then in the paint routine draw the image you want to use - you could use the panel's value to select the image if you're not using it for anything else.</p>
]]></description><link>https://forum.hise.audio/post/119314</link><guid isPermaLink="true">https://forum.hise.audio/post/119314</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 08 Apr 2026 12:05:35 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 11:52:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/67">@Lindon</a> ..and if I reload the image in the paint callback it works -- but that seems very inefficient..</p>
]]></description><link>https://forum.hise.audio/post/119312</link><guid isPermaLink="true">https://forum.hise.audio/post/119312</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 11:52:41 GMT</pubDate></item><item><title><![CDATA[Reply to Images in panels - load and unload on Wed, 08 Apr 2026 11:44:23 GMT]]></title><description><![CDATA[<p dir="auto">, just to be clear I also tried just load, but this seems to load multiple images and only ever displays the first one....</p>
]]></description><link>https://forum.hise.audio/post/119311</link><guid isPermaLink="true">https://forum.hise.audio/post/119311</guid><dc:creator><![CDATA[Lindon]]></dc:creator><pubDate>Wed, 08 Apr 2026 11:44:23 GMT</pubDate></item></channel></rss>