PDA

View Full Version : List control question about layout


Nuka1195
2007-04-23, 02:12
<!-- ** 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 :)

http://www.supload.us/thumbs/default/list_sample.PNG (http://www.supload.us/free/list_sample.PNG/view/)

CHI3f
2007-04-23, 03:22
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.

Nuka1195
2007-04-23, 04:59
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.

Jezz_X
2007-04-23, 06:00
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