dynamically changing height of list???
I'm trying to adjust the height of a list depending on the type of Season art i want to show, either poster or landscape.

This is what i managed so far:
Originally in this view they did not show any of the season art. So i created two different image controls that will display the Season art or revert to Show art if no Season art is available. Did this for Poster and Landscape. This all works and i can change which image is visible by changing the visible property.

Next thing i tried was to make the correct image appear depending on a variable set by my (Eventually i will try to turn this into a skin setting). Here i already ran into problems Smile

This is the syntax i used to make the variable

    <!-- Variable for choice between Season Landscape or Poster Try to turn this into a skin property later-->
    <variable name="View525SeasonLandscapeOrPoster">
        <!-- <value>poster</value> -->

my idea was that whatever i put there as value can be read later by using $VAR[View525SeasonLandscapeOrPoster], like this:

            <!-- Season Landscape -->
            <control type="image">
                <aspectratio aligny="center" align="left">keep</aspectratio>
                <include condition="!String.Contains(Skin.String(SkinHelper.StudioLogos.Path),colo)">videoInfoColorDiffuse</include>
                <texture background="true">$VAR[View525SeasonOrShowLandscape]</texture>

But that doesn't seem to work, to get around that i created a label with ID set the visible to false and just set the label to landscape or poster, but that makes the variable obsolete.

            <!-- Hidden Label for Landscape/Poster choice -->
            <control type="label" id="12345">

changing the visible tag in the image to this made it work as expected:


So now i can change the layout depending on what it type in the "hidden" label

The result looks like this for poster:

And like this for landscape:

So now we are getting to the problem im struggling with. There is much more space when you use the landscape view so i wanted to extend the season list back to 5 rows when using landscape and 4 rows for poster(originally there were 7 rows)

Ive tried to add a condition the the height just like above for making the images visible,  but that didn't work

<height condition="String.Contains(Control.GetLabel(12345),poster)">260</height>
<height condition="String.Contains(Control.GetLabel(12345),landscape)">325</height>

Then i tried a variable again and some includes:

    <!-- Variable for Height of SeListItem   For now i manually set height here-->
    <variable name="SeasonListHeight">
    <!-- Height for Poster View -->
    <include name="View525_PosterHeight">
        <!-- Height for Landscape View -->
    <include name="View525_LandscapeHeight">

And tried to use it like this, but again no luck


<include condition="String.Contains(Control.GetLabel(12345),poster)">View525_PosterHeight</include>
<include condition="String.Contains(Control.GetLabel(12345),landscape)">View525_LandscapeHeight</include>

Nothing of what i tried so far seems to work. Can anybody shed any light on what i might be doing wrong.

Here you can see the layout of part i'm trying to edit:

Below is more detail of the list and the height i would like to change:


Sorry for the massively long post but i wanted to give as much info as possible since i'm still very new at all this

Messages In This Thread
dynamically changing height of list??? - by CK77 - 2020-06-27, 02:52

Logout Mark Read Team Forum Stats Members Help
dynamically changing height of list???0
This forum uses Lukasz Tkacz MyBB addons.