Solved Control.IsVisible() is not working
#1
Hi,

I have a panel with id of '59'
Panel -> itemlayout -> group -> include -> include with a condition of 'Control.IsVisible(59)'

Code:
    <include name="View_59_BigPanelDetails">
        <control type="group">
            <visible>Control.IsVisible(59)</visible>
            <include>View_59_BigPanelDetails_layout_original</include>
      </control>
    </include>

Code:
    <include name="View_59_BigPanelDetails_layout_original">
           <control type="panel" id="59">
                <itemlayout>
                    <control type="group">
                        <include content="Tag_NF">
                            <param name="tagwidth" value="251" />
                            <param name="tagtop" value="280" />
                        </include>
                    </control>
                </itemlayout>
            </control>    
    </include>

Code:
    <include name="Tag_NF">
        <include condition="Control.IsVisible(59)" content="PosterTagOverlay">
            <param name="tagwidth" value="$PARAM[tagwidth]" />
            <param name="tagtop" value="$PARAM[tagtop]" />
        </include>
    </include>

Why the condition of Control.IsVisible(59) is always false here?

Thanks.
Reply
#2
Strange.
I have noticed that entering to the window the first time after ReloadSkin the condition is False,
But after entering on the second time, the condition is True.

Why is that?
Reply
#3
Are there any visible conditions for the panel itself?
Reply
#4
(2021-10-24, 12:43)Hitcher Wrote: Are there any visible conditions for the panel itself?

For the panel there wasn't a visible condition.
But I added this condition:
Code:
<visible>Control.IsVisible(59)</visible> 
And it the same.
The first time after a ReloadSkin, the include condition value is false, and the second time it's true. Why?
Reply
#5
Maybe because on the initial loading the condition is checked before the panel has time to fill with content?
Reply
#6
Ok, so I move the include condition into visible condition of the control inside the include, and it fixed.
Reply

Logout Mark Read Team Forum Stats Members Help
Control.IsVisible() is not working0