Conditional visibility when image cant be loaded - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: Conditional visibility when image cant be loaded (/showthread.php?tid=120318) |
Conditional visibility when image cant be loaded - Suven - 2012-01-19 Hi! I have an URL of a logo set in a variable Code: <variable name="TVShowLogoVar"> and use this variable to display an image. Now I want to display a label if the image does not exist. How do I achieve that? I did not find anything in the wiki that would fit my needs.. Edit:\ I already have the image showing up and the label too. I just need that visibilty-part. I already tried to check for !$VAR[TVShowLogoVar] but this is a dead end - Jeroen - 2012-01-19 Not possible afaik - `Black - 2012-01-19 Add an id to your image, set fallback to i.e. empty.png and use stringcompare(Control.GetLabel(id)) as visibility condition in your label. - Suven - 2012-01-19 Thanks for your help! Like this Code: <control type="image" id="tvShowLogo"> I also tried using substring and moved the id from the control to the texture and now I don't have any more ideas.. - Hitcher - 2012-01-19 The id needs to be a number. - Suven - 2012-01-19 Great! Thank you all (: |