List control question about layout
#1
Code:
<!-- ** Required ** Do not change <id> or <type> -->
  <control type="list" id="101">
   <description>Team Credits Label</description>
            <posx>63</posx>
            <posy>100</posy>
            <width>300</width>
            <height>60</height>
   <scrolltime>200</scrolltime>
   <itemlayout height="20">
    <control type="label">
     <posx>3</posx>
     <posy>1</posy>
     <width>200</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>left</align>
     <info>ListItem.Label</info>
    </control>
    <control type="label">
     <posx>275</posx>
     <posy>1</posy>
     <width>90</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>right</align>
     <info>ListItem.Label2</info>
    </control>
   </itemlayout>
   <focusedlayout height="20">
    <control type="label">
     <posx>3</posx>
     <posy>1</posy>
     <width>200</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>left</align>
     <info>ListItem.Label</info>
    </control>
    <control type="label">
     <posx>275</posx>
     <posy>1</posy>
     <width>90</width>
     <height>18</height>
     <font>font10</font>
     <aligny>center</aligny>
     <align>right</align>
     <info>ListItem.Label2</info>
    </control>
   </focusedlayout>
  </control>

1. If I don't include the <focusedlayout> block only two lines show instead of three, even if it never gets focused. If I do focus it it scrolls weird.

2. If I make it type="listcontrol" only one line shows and the font is way off.

I'm no skinner obviously, so if this is normal, don't feel obligated to explain Smile

Image
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
You should not take the <focusedlayout> from the list control as that is the part that holds all the focused list item attributes. So if you are trying to add a button or something you need to include a image control of the button you are using and adding into the <focusedlayout> section.

If you made the control type a listcontrol then it will no use the item layout and focusedlayout. It will use all the default tags given to it in the Defaults.xml.

If I knew what you were trying to accomplish with the list then I could help you more.
Reply
#3
thanks CHI3F,

I was just trying to have a list with two labels and three rows. It never gains focus it's just for display.

I wasn't sure if that was a bug.

Thanks for the listcontrol explanation, that confused me as I didn't know they worked differently. I just thought they changed the name.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
nuka even though the list never gets focused the first item in the list is set as the focus position when it is drawn thats why for images the list useally have a <visible>!contol.hasfocus(listid) for a non focus focused item
Reply

Logout Mark Read Team Forum Stats Members Help
List control question about layout0