Control Toggle Buttons in add-ons
#1
Can Control Toggle Buttons be used in add-on dialog windows?
If so, how can you determine the state of the button in an add-on script?
Reply
#2
According to ronie: https://forum.kodi.tv/showthread.php?tid=257189 you can't use toggle buttons in add-on.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply
#3
(2019-04-18, 13:09)bigretromike Wrote: According to ronie: https://forum.kodi.tv/showthread.php?tid=257189 you can't use toggle buttons in add-on.
Thanks
Reply
#4
You can use ControlRadioButton
Reply
#5
I looked at that but it appears to not let you create a classic radiobutton with concentric circles. It offsets one of textures to the right and I didn't see a way around that.
Reply
#6
(2019-04-20, 20:03)jmooremcc Wrote: I looked at that but it appears to not let you create a classic radiobutton with concentric circles. It offsets one of textures to the right and I didn't see a way around that.

Not quite true. I don't know about XML-based layout (I don't have much experience with that) but ControlRadioButton is a classic round on/off button. Of course, for a vanilla xbmcgui.ControlRadioButton you need to supply a full set of texture images.

You can see here how it looks with different textures: http://romanvm.github.io/script.module.p...trols.html
Reply
#7
(2019-04-21, 09:14)Roman_V_M Wrote:
(2019-04-20, 20:03)jmooremcc Wrote: I looked at that but it appears to not let you create a classic radiobutton with concentric circles. It offsets one of textures to the right and I didn't see a way around that.

Not quite true. I don't know about XML-based layout (I don't have much experience with that) but ControlRadioButton is a classic round on/off button. Of course, for a vanilla xbmcgui.ControlRadioButton you need to supply a full set of texture images.

You can see here how it looks with different textures: http://romanvm.github.io/script.module.p...trols.html  

Thank you for the information. However, I was referring to the following documentation: https://kodi.wiki/view/Skinning_Manual#R...on_Control
Quote:textureradioonfocus: Specifies the image file which should be displayed for the radio button portion when it's the button is on and focused. This texture is positioned on the right of the button – it's positioned 24 pixels from the right edge of the button, and 8 pixels above the center vertically.
I've not used the radiobutton control in an xml file before so I'm looking for any guidance I can get. It's just that that statement above caught my eye and made be assume that it was not possible to create a "classic" radiobutton.
Reply
#8
(2019-04-22, 01:08)jmooremcc Wrote: I've not used the radiobutton control in an xml file before so I'm looking for any guidance I can get. It's just that that statement above caught my eye and made be assume that it was not possible to create a "classic" radiobutton.

Kodi supports 2 ways to create custom UIs for addons - XML-based layout like in skins and Python controls. Python-based controls are not that fancy and functional as XML-based layouts but still allow to create relatively simple UIs without a learning curve for XML skinning.
Reply

Logout Mark Read Team Forum Stats Members Help
Control Toggle Buttons in add-ons0