counterpoke
08-16-2004, 11:27 PM
All I want to do is align the text "center", but it just won't work :(
It will either changing it right, center or left does nothing. If I add a "<view>" and make it the parent of "<text>" what happens is weird. left will leave it normal, and right moves it to left exactly so that it makes it look like it is aligned to the right on the wrong picture. If you say center, it looks nothing like center. Could you help?
This is the code that matters:
<!--This class provides picture buttons with width=height=60-->
<class name="picButton" extends="basebutton" width="60" height="60" />
<!--This class provides picButtons with a caption at the bottom (60,80) (x,y)-->
<class name="viewbutton" extends="view" width="60" height="80"
resource="Home">
<attribute name="text" type="html"/>
<simplelayout spacing="2" axis="y" />
<picButton name="pic" resource="${parent.resource}" />
<text width="60" fgcolor="0xC8E5CA" align="right" name="subtitle"
text="${parent.text}"/>
</class>
And this is the specific line of code I'm having trouble with:
<text width="60" fgcolor="0xC8E5CA" align="right" name="subtitle"
text="${parent.text}"/>
It will either changing it right, center or left does nothing. If I add a "<view>" and make it the parent of "<text>" what happens is weird. left will leave it normal, and right moves it to left exactly so that it makes it look like it is aligned to the right on the wrong picture. If you say center, it looks nothing like center. Could you help?
This is the code that matters:
<!--This class provides picture buttons with width=height=60-->
<class name="picButton" extends="basebutton" width="60" height="60" />
<!--This class provides picButtons with a caption at the bottom (60,80) (x,y)-->
<class name="viewbutton" extends="view" width="60" height="80"
resource="Home">
<attribute name="text" type="html"/>
<simplelayout spacing="2" axis="y" />
<picButton name="pic" resource="${parent.resource}" />
<text width="60" fgcolor="0xC8E5CA" align="right" name="subtitle"
text="${parent.text}"/>
</class>
And this is the specific line of code I'm having trouble with:
<text width="60" fgcolor="0xC8E5CA" align="right" name="subtitle"
text="${parent.text}"/>