2014-03-03, 22:13
Hi,
I'm trying to center a label within a list element which contains multiple labels, but the text isn't centered at all. Instead it's shifted outside the left position of the label. My current code:
Expected behavior:
1 Item with centered text (horizontal and vertical)
2 Text items right from the centered item
Can't get this to work - any ideas?
I'm trying to center a label within a list element which contains multiple labels, but the text isn't centered at all. Instead it's shifted outside the left position of the label. My current code:
Code:
<control type="list">
<left>0</left>
<top>0</top>
<width>400</width>
<height>400</height>
<itemlayout width="400" height="100">
<control type="label">
<left>0</left>
<top>0</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>TEST</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
<control type="label">
<left>100</left>
<top>0</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>Title label</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
<control type="label">
<left>100</left>
<top>50</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>Subtitle label</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
</itemlayout>
<focusedlayout width="400" height="100">
<control type="label">
<left>0</left>
<top>0</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>TEST</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
<control type="label">
<left>100</left>
<top>0</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>Title label</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
<control type="label">
<left>100</left>
<top>50</top>
<width>100</width>
<height>100</height>
<align>center</align>
<aligny>center</aligny>
<label>Subtitle label</label>
<textcolor>FFFFFFFF</textcolor>
<font>font13</font>
</control>
</focusedlayout>
</control>
Expected behavior:
1 Item with centered text (horizontal and vertical)
2 Text items right from the centered item
Can't get this to work - any ideas?