dynamically changing height of list???
#1
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> -->
        <value>landscape</value>
    </variable>

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">
                <visible>String.Contains($VAR[View525SeasonLandscapeOrPoster],landscape)</visible>
                <left>150</left>
                <width>550</width>
                <height>305</height>
                <bottom>50</bottom>
                <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>
            </control>

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">
                <visible>false</visible>
                <left>50</left>
                <width>100</width>
                <height>40</height>
                <bottom>50</bottom>
                <label>poster</label>
            </control>            

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

<visible>String.Contains(Control.GetLabel(12345),landscape)</visible>

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

The result looks like this for poster:
Image

And like this for landscape:
Image

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">
        <value>325</value>
        <value>260</value>
    </variable>
    
    <!-- Height for Poster View -->
    <include name="View525_PosterHeight">
        <height>260</height>
    </include>
        <!-- Height for Landscape View -->
    <include name="View525_LandscapeHeight">
        <height>325</height>
    </include>

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


<height>$VAR[SeasonListHeight]</height>

<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:

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

Image

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
Reply


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.