Problems with onclick behaviour on panel with Content from target="url"
#1
Hi Everybody,

I have a panel control that shows a bunch of icons for the user to choose an Image that will be used on a Home Item of my skin.

I have created a button control within the focused layout, so that when the users clicks on an item a string will be set, with the path of the selected image.

I am having problems with this onclick behaviour, apparently the onclick behaviour is not beeing executed at all.

Is there something I have missed? or are this type of onclick simply behaviours not supported with the new Content filling option of gotham?


Code:
<control type="panel" id="4">
            <top>50</top>
            <left>1290</left>
            <width>1190</width>
            <height>630</height>
            <itemlayout height="70" width="70">
                <control type="image">
                    <width>65</width>
                    <height>65</height>
                    <texture>tile.png</texture>
                </control>
                <control type="image">
                    <width>65</width>
                    <height>65</height>
                    <texture>$INFO[ListItem.Label,Icons/]</texture>
                    <bordersize>5</bordersize>
                </control>
            </itemlayout>
            <focusedlayout height="70" width="70">
                <control type="button">
                    <width>65</width>
                    <height>65</height>
                    <onclick>Skin.SetString(CustomHomeTile.Image,Icon/$INFO[ListItem.Label])</onclick>
                    <texturefocus>button.png</texturefocus>
                </control>
                <control type="image">
                    <width>65</width>
                    <height>65</height>
                    <texture>$INFO[ListItem.Label,Icons/]</texture>
                    <bordersize>5</bordersize>
                </control>
    
            </focusedlayout>
            <content target="url">special://skin/media/Icons/</content>
        </control>
Reply
#2
Buttons don't work in lists.
Image
Reply
#3
(2014-06-09, 01:58)`Black Wrote: Buttons don't work in lists.


Well they kind of work, becase the button gets focus and displays the focus texture. Also I have used the same principle elsewhere in the skin where instead of using an <onclick> tag, I used a an <onfocus> tag and with the <onfocus> tag the command does get executed. So I guess just the onclick behaviour is not working.

Thanks a lot for the info , now I will have to find another solution
Reply
#4
Yes onfocus does work because everything in the focusedlayout gets focused but onclick does not because the onclick action of the list items gets executed.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Problems with onclick behaviour on panel with Content from target="url"0