scrolling button controls
#1
I have created some custom buttons that I am using for a script I am working on...but the number of buttons varies, is there a way to add a scrollbar control to a bunch of buttons?
Reply
#2
If you use a grouplist to place the buttons in, sure. You'd be using windowxml to achieve this.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
thanks for the response, I will say that I am new to scripting for XBMC, I have looked through the documentation but may have missed this so bear with me.

This is a dynamic list created based on the output of a SQL query. The query returns all TV show names and paths, I am then hashing the path, retrieving the tbn and creating a button for each. I am overlaying these buttons on the tbn for each tv series.

I can make this work just fine using xbmcgui.window, but if there are too may buttons they are off screen and I take from your comments there is not a grouplist available in xbmcgui.window, only windowxml.


As I have been looking at window.xml, I can see how I could add a known amount of button controls to a controllist, but how would I do this in the above scenario? Is there a way to create/modify the XML file at run time?

I am sure there is an obvious solution, but I am struggling to find it in any of the docs?

any help is appreciated.

thanks
Reply
#4
you could use a list control and make the images for the items look like buttons.

but

i can't test now, but jmarshall did make a change where any container control can be acted on, so try windowxml, give the control an id (not 50-59) and try self.getControl(id).addItem(listitem). it may work Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
scrolling button controls0