Solved Stuck on conditional visibility of a button
#1
Question 
Hi,

I have the following code:

PHP Code:
                <control type="grouplist" id="9000">
                    [....]
                    <
ondown condition="!Control.IsVisible(50) + !Control.IsVisible(9501) + Container.Content(movies) + Player.HasVideo">1234</ondown>
                </
control

When clicking on down, I'd like button id "1234" below to become visible. It is essentially a text label and has no texture:

PHP Code:
        <control type="button" id="1234">
            <
description>Trailer Video Window Label</description>
            <
right>SidePad</right>
            <
top>410</top>
            <
width>320</width>
            <
height>36</height>
            <
align>center</align>
            <
font>Mini</font>
            <
size>15</size>
            <
textcolor>Dark2</textcolor>
            <
animation effect="fade" time="700">VisibleChange</animation>
            <
label>[LIGHT]Click for full screen[/LIGHT]</label>
        </
control

The problem is I cannot get button 1234 to display only when it becomes focused. The label in button 1234 seems to show permanently and my attempts at conditional visibility don't seem to have any effect. I would appreciate if anyone can tell me where I am going wrong and advise me on what I need to do to get the label in button1234 to show only when the button receives focus.

Thanks Wink
Reply
#2
Add:
<visible>Control.HasFocus(1234)</visible>

Or add a conditional animation ...
To your button.
Reply
#3
(2016-02-07, 21:04)butchabay Wrote: Add:
<visible>Control.HasFocus(1234)</visible>

Or add a conditional animation ...
To your button.

Thanks butchabay, that worked. However, it leaves a grey background behind the button. Is it possible to remove the background so that the button appears purely as text?

Cheers
Reply
#4
Just to update this thread, I've found a solution to this by using

PHP Code:
<texturefocus></texturefocus


Not sure if that's the best way, but it works.
Reply

Logout Mark Read Team Forum Stats Members Help
Stuck on conditional visibility of a button0