ControlList...Scroll?
#1
well sorry if a search can shed light on this but i have searched any term i can think of...
i have a list of items that is returned to my script and then which are thrown into a controllist box:
Quote:housestatusre = re.compile('<tr><td>(.*?)</td></tr>')
housestatus = housestatusre.findall(rh_html)
resultlist = []
for info in housestatus:
title = info
self.statlist.additem(str(title))

the list is either cutoff if i shrink the size of the controllist or extends too far down the screen. is there a method of scrolling or using the nifty arrow buttons to advance the list.

much obliged.
-tartag
Reply
#2
you mean you want be able to scroll you list by script code, not for user action ?
if you want to give opportunity to iser to scroll in the controllist, you'll need to give the focus to the list :

self.setfocus(self.statlist)

i hope it helps
Reply
#3
yes i am confused by this post as well. scrolling on a control list is automatic if there are too many results to fit in the list. if it is too short / too long just change the height to be bigger / smaller respectively. and yeah like solexalex said you have to tie in the navigation so you can navigate to it.
Reply
#4
thanks guys for your feedback, that solves the intial problem, though what i think i wanted to do was use the up/down arrows that show pages such as 3/15  say in the list of visualisation presets etc.  the bigger issue seems to be the spacing within the list.  i can tighten the list up by using the space= parameter, though once i add that to my lists variables i can no longer use variables such as font10 and color... i still have a lot to learn about the sensitivitys of python (i thought forgeting a ';' in perl was nitpicky!  Rolleyes



Reply
#5
sorry... i don't really understand what is/are your problem...
Shocked
Reply
#6
well two fold i guess. the first and most on-topic is wanting to add (i am using pmiii) the small black up down arrows into my script. an example of these arrows shows up when for instance you are looking at a visulisation and hit "y" to bring up the presets you can scroll through each, or select the arrow to jump through the pages: <img of arrow up>1/76<img of arrow down> those arrows and associated function are what i am hoping for... that said this may be a built-in behavior i am missing...

second, here is my list:
Quote:self.statlist = xbmcgui.controllist(int(500 * self.scalex),int(135 * self.scaley), int(500 * self.scalex), int(300 * self.scaley))
in what format can i add both the space parameter (space=1) and the font size and color params ("font10", "0xff0000cc")

mixing the two seems to break the script.

cheers.
Reply
#7
okay, i get the flattend crank award as now that i look back at my post i realize what a jacka** post it was. now that i have the scrolling porition straight, i still for the life of me cannot get
Quote: self.statlist = xbmcgui.controllist(int(380 * self.scalex),int(145 * self.scaley), int(225 * self.scalex), int(100 * self.scaley),"space=12")
to work. by having the space parameter in their the list now appears empty...

where have a screwed up now?
tartag
Reply
#8
in python you have the default arguments and the keyword arguments. the default arguments are from the left to the right, are required, and the order matters. the keyword arguments are always optional (they already have default values), have identifiers and can be in any order.

the way you normally call a function in python then is to specify all the arguments you want from left to right (these must include the default arguments but can go past them to include keyword arguments without an identifier) followed by any identified keyword arguments you want.

anyway what you had wrong was that you were turning a keyword argument into a string with superfluous quotes.

you also dont need scalex scaley stuff anymore... just use xbmcgui.setcoordinateresolution and scaling is automatic.
Quote: self.statlist = xbmcgui.controllist(380,145, 225, 100,space=12)



Reply
#9
gottcha, never was goodwith order of operation! much obliged!

-tartag
Reply

Logout Mark Read Team Forum Stats Members Help
ControlList...Scroll?0