PDA

View Full Version : ListControl & icon / thumbnail & sizing?


Livin
2006-02-01, 14:45
it seems that no matter what size i make the jpg file listcontrol displays the image the same size... and changing it from thumbnail to icon makes no difference.

what is supposed to be the difference between the two and how/can you change the display size?

thx!

smuto
2006-02-01, 15:14
biglistitemexample

import xbmcgui

def debug( str ):
* *xbmc.output( str )

class window( xbmcgui.window ):
* *def ( self ):
* * * *xbmcgui.window.( self )
* * * *self.checkmark = none

* *def create( self ):
* * * *self.addcontrol(xbmcgui.controlimage(0,0, 720,576, 'background-apps.png'))
* * * *self.ctl = xbmcgui.controllist(220, 121, 450, 420,font='font13',textcolor='0xffffffff',buttontex ture='blue-rectanglenf.png',buttonfocustexture='blue-rectangle.png',selectedcolor='ffffffff',imagewidth =73,imageheight=83,itemtextxoffset=0,itemtextyoffs et=0,itemheight=91,space=7,alignmenty=2)
* * * *self.addcontrol( self.ctl )
* * * *self.setfocus( self.ctl )
* * * *labels = { 0: 'zero', 1: 'one', 2: 'two', 3: 'three' }
* * * *for k,v in labels.items():
* * * * * *self.ctl.additem(
* * * * * * * *xbmcgui.listitem(
* * * * * * * * * *label=str(k), label2=v,
* * * * * * * * * *thumbnailimage='defaultprogrambig.png' ) )

* *def onaction( self, action ):
* * * *debug( "> window.onaction( action=[%s] )"%action )
* * * *if action in (9,10):
* * * * * *self.close()
* * * *debug( "< window.onaction( action=[%s] )"%action )

win = window()
win.create()
win.domodal()
del win


there is no probloblem with size of thumbnail

but can s1 please help me with offset and alignmenty
i try to make
label 1 in top left with offset
label 2 in bottom right
is it possible?

jmarshall
2006-02-02, 01:07
not currently, no.

you must alter the xbmc python interface (controllist.cpp in xbmc/lib/libpython/xbmcmodule) to allow the extra parameters needed to be passed.

if you do this, it will surely be added to cvs.

cheers,
jonathan