Use smaller font size if label is greater than grouplist width?
#1
Hi Guys

I have a grouplist setup to display the movie title and cert beside one another. If a movie title is too long its gets cut off at the end.

I would like to use another label with a smaller font only if the movie title is greater than width. I cant increase the grouplist width as it overlaps other images.

I could reduce the font size overall but would like to keep the bigger font for all movies and only use smaller font for longer titles.

Not sure what conditional visibility to use for this.

Thanks for any info
Code:
<control type="grouplist">
                    <left>300</left>
                    <top>832</top>
                    <orientation>horizontal</orientation>
                    <itemgap>4</itemgap>
                    <width>1240</width>
                    <control type="label">
                        <!-- Title -->
                        <width>auto</width>
                        <height>60</height>
                        <font>Font_movie</font>
                        <textcolor>FFFFFAF0</textcolor>
                        <label>$VAR[value_videotitle] </label>
                        <shadowcolor>red</shadowcolor>
                    </control>
                    <control type="image">
                        <!-- Certification -->
                        <height>54</height>
                        <width>54</width>
                        <align>center</align>
                        <aligny>center</aligny>
                        <aspectratio>keep</aspectratio>
                        <texture>$VAR[value_mpaa]</texture>
                    </control>
                </control>
Reply
#2
Use a hidden textbox with the same attributes as the label (height, width, font, etc) and add a pagecontrol to it. Also hide a scrollbar control (with the pagecontrol ID from the textbox) using the same height and add <showonepage>false</showonepage> to it. Now you can use Control.IsVisible(SCROLLBAR_ID) and !Control.IsVisible(SCROLLBAR_ID) as visible conditions for each label.
Reply
#3
(2018-01-18, 17:15)Hitcher Wrote: Use a hidden textbox with the same attributes as the label (height, width, font, etc) and add a pagecontrol to it. Also hide a scrollbar control (with the pagecontrol ID from the textbox) using the same height and add <showonepage>false</showonepage> to it. Now you can use Control.IsVisible(SCROLLBAR_ID) and !Control.IsVisible(SCROLLBAR_ID) as visible conditions for each label.
 Cheers hitcher i'll give that a try
Reply

Logout Mark Read Team Forum Stats Members Help
Use smaller font size if label is greater than grouplist width?0