How do I make Text and Image controls appear on the same line?
#1
Question 
Hi guys,

I'm trying to make a control which has both text and images on the same line. I thought you can achieve this with a GroupList but my attempt has so far proven unsuccessful. Here's what I have:

PHP Code:
                        <control type="grouplist">
                            <
description>My first group list control</description>
                            <
orientation>horizontal</orientation>
                            <
height>50</height>
                            <
posy>-10</posy>
                            <
control type="label">
                                <
height>36</height>
                                <
font>Mini</font>
                                <
textcolor>Dark2</textcolor>
                                <
label>$INFO[ListItem.RatingAndVotes, ,] • $INFO[ListItem.Year• $INFO[ListItem.MPAA• $INFO[ListItem.Duration,, $LOCALIZE[12391]]</label>
                                <
aligny>center</aligny>
                            </
control>
                            <
control type="image">
                                <
width>150</width>
                                <
texture>$INFO[ListItem.MPAA,flags/mpaa/,.png]</texture>
                            </
control>
                        </
control

Unfortunately, the image control ('MPAA flag') does not appear on the same line. I'm guessing I'm close but I can't figure out what's wrong and would really appreciate some help on where I've gone wrong.

Thank you. Wink
Reply
#2
use usecontrolcoords in your grouplist.
Code:
<usecontrolcoords>true</usecontrolcoords>
then you can add posx\posy to your label\image in order to make them aligned.
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
#3
(2016-01-11, 20:44)tomer953 Wrote: use usecontrolcoords in your grouplist.
Code:
<usecontrolcoords>true</usecontrolcoords>
then you can add posx\posy to your label\image in order to make them aligned.

That doesn't seem to work. As the length of the text in the label is dynamic, the width of it can vary. I need the image to be displayed after the label finishes.

Basically, this is what I'm trying to achieve (a horizontal list):

Image
Reply
#4
you didnt define a width for the label. you probably want <width min="xx" max="xx">auto</width>
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
(2016-01-11, 21:10)phil65 Wrote: you didnt define a width for the label. you probably want <width min="xx" max="xx">auto</width>

You're a gem Phil, <width>auto</width> was exactly what I needed and it works perfectly now.

Thank you so much Wink
Reply
#6
(2016-01-11, 20:44)tomer953 Wrote: use usecontrolcoords in your grouplist.
...
then you can add posx\posy to your label\image in order to make them aligned.
Cool, I didnt know about that tag. Thanks.
The method I've been using is the 'static' animation... quite usefull too for conditional positioning.
Code:
<animation effect="slide" end="0,10" time="0" condition="true">Conditional</animation>
I wonder if there is any performance impact though, and if I should change all of these to use 'usecontrolcoords'..
Reply

Logout Mark Read Team Forum Stats Members Help
How do I make Text and Image controls appear on the same line?0