Kodi Community Forum

Full Version: Toggle button control
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how do I hide an image by pressing a toggle button?
here is my layout: http://prntscr.com/9sgzhc
python addons can't use toggle buttons, so use a regular one instead.

you can capture the onClick() in your code.
http://mirrors.xbmc.org/docs/python-docs...og-onClick

than you can change/hide the image (and change the button label if needed) in your code.
this is a skin addon, can't I put the image waiting for the action in the toogle button and when clicked the image hides and when re-clicked the image re-appears?
it can be a toggle button or a regular button, doesn't matter, as long as it works
Found this animation that I can use on image control: <visible>Control.HasFocus(25)</visible>

It's not what I wanted, but its close
add a conditional onclick to the buttons which sets/clear a window property.
use that window property as a visible condition for your image.