<screen name="ChoiceBoxExt" position="130,140" size="600,400" title="Input">
	<widget name="text" position="10,10" size="550,25" font="mediaportal;22"/>
	<widget name="list" position="0,30" size="550,300" itemHeight="25" scrollbarMode="showOnDemand" transparent="1"/>
	<applet type="onLayoutFinish">
# this should be factored out into some helper code, but currently demonstrates applets.
from enigma import eSize, ePoint

orgwidth = self.instance.size().width()
orgpos = self.instance.position()
textsize = self["text"].getSize()

# y size still must be fixed in font stuff...
textsize = (textsize[0] + 30, textsize[1] + 30)
count = len(self.list)
if count &gt; 10:
        count = 10
offset = 25 * count
wsizex = textsize[0] + 30
wsizey = textsize[1] + offset + 20

if (650 &gt; wsizex):
        wsizex = 650
wsize = (wsizex, wsizey)

# resize
self.instance.resize(eSize(*wsize))

# resize label
self["text"].instance.resize(eSize(*textsize))

# move list
listsize = (wsizex - 20, 25 * count)
self["list"].instance.move(ePoint(10, textsize[1]))
self["list"].instance.resize(eSize(*listsize))

# center window
newwidth = wsize[0]
self.instance.move(ePoint((1280-wsizex)/2, (720-wsizey)/2))
	</applet>
</screen>
