Using a Button in a Panel Control
#1
Hi all!
Is it possible to use Button Controls in a Panel Control where you have itemlayout and focuseditemlayout? I try for some time now to realise this and would be thankful for a hint. I tried to "grep" Esuary's XML folder with -e "button.*focusedlayout" and got no hit, so i am asking myself if this even will work.
What i try to get is Items of the Kind: 2 Pictures 150x150 beside each other, and beside these 2 Pictures 2 Buttons that you can press once the item is focused.

What i got for now is:
Code:

        <scrolltime tween="cubic" easing="out">500</scrolltime>        
        <onup>20000</onup>
        <ondown>20001</ondown>
        <usecontrolcoords>true</usecontrolcoords>        
        <control type="panel" id="$PARAM[panelid]">
            <left>480</left>
            <top>161</top>
            <width>1102</width>
            <height>900</height>
            <orientation>vertical</orientation>
            <pagecontrol>25010</pagecontrol>
            <onleft>9000</onleft>
            <onright>26300</onright>
            <itemlayout height="215" width="1100">
                <control type="group">        
                    <control type="label">
                        <left>90</left>
                        <top>170</top>
                        <width>320</width>
                        <height>25</height>
                        <textcolor>FF00ffff</textcolor>
                        <shadowcolor>ff000000</shadowcolor>
                        <font>font12</font>
                        <align>center</align>
                        <label>$INFO[ListItem.Property(Name)]</label>
                        <scroll>True</scroll>
                        <scrollspeed>55</scrollspeed>                        
                    </control>                
                    <control type="image">
                        <left>170</left>
                        <top>25</top>
                        <width>150</width>
                        <height>150</height>
                        <background>True</background>
                        <aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
                        <texture>$INFO[ListItem.Property(Texture1)]</texture>
                    </control>
                    <control type="label">
                        <left>425</left>
                        <top>170</top>
                        <width>320</width>
                        <height>25</height>
                        <textcolor>FF00ffff</textcolor>
                        <shadowcolor>ff000000</shadowcolor>
                        <font>font12</font>
                        <selectedcolor>green</selectedcolor>
                        <align>center</align>
                        <label>$INFO[ListItem.Property(Name)]</label>
                        <scroll>True</scroll>
                        <scrollspeed>55</scrollspeed>                            
                    </control>                    
                    <control type="image">
                        <left>510</left>
                        <top>25</top>
                        <width>150</width>
                        <height>150</height>
                        <background>True</background>
                        <aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
                        <texture>$INFO[ListItem.Property(Texture2)]</texture>
                    </control>                
                    <control type="button" id="100">
                          <description>My first button control</description>
                          <left>905</left>
                          <top>100</top>
                          <width>80</width>
                          <height>80</height>
                          <visible>true</visible>
                          <colordiffuse>FFFFFFFF</colordiffuse>
                          <texturefocus colordiffuse="button_focus">buttons/button-fo.png</texturefocus>
                          <texturenofocus>buttons/dialogbutton-nofo.png</texturenofocus>
                          <label>$NUMBER[1]</label>
                          <wrapmultiline>true</wrapmultiline>
                          <font>font32_title</font>
                          <textcolor>FFFFFFFF</textcolor>
                          <focusedcolor>FFFFFFFF</focusedcolor>
                          <disabledcolor>80FFFFFF</disabledcolor>
                          <invalidcolor>FFFFFFFF</invalidcolor>
                          <align>center</align>
                          <aligny>center</aligny>
                          <textoffsetx></textoffsetx>
                          <textoffsety></textoffsety>
                          <pulseonselect>True</pulseonselect>
                          <onclick>ActivateWindow(1100)</onclick>
                          <onfocus></onfocus>
                          <onunfocus></onunfocus>
                          <onup></onup>
                          <ondown></ondown>
                          <onleft></onleft>
                          <onright>26300</onright>
                    </control>
                    <!-- Spiel 2 -->                    
                    <control type="button" id="200">
                          <description>My first button control</description>
                          <left>985</left>
                          <top>100</top>
                          <width>80</width>
                          <height>80</height>
                          <visible>true</visible>
                          <colordiffuse>FFFFFFFF</colordiffuse>
                          <texturefocus colordiffuse="button_focus">buttons/button-fo.png</texturefocus>
                          <texturenofocus>buttons/dialogbutton-nofo.png</texturenofocus>
                          <label>$NUMBER[2]</label>
                          <wrapmultiline>true</wrapmultiline>
                          <font>font32_title</font>
                          <textcolor>FFFFFFFF</textcolor>
                          <focusedcolor>FFFFFFFF</focusedcolor>
                          <disabledcolor>80FFFFFF</disabledcolor>
                          <invalidcolor>FFFFFFFF</invalidcolor>
                          <align>center</align>
                          <aligny>center</aligny>
                          <textoffsetx></textoffsetx>
                          <textoffsety></textoffsety>
                          <pulseonselect>True</pulseonselect>
                          <onclick>ActivateWindow(1100)</onclick>
                          <onfocus></onfocus>
                          <onunfocus></onunfocus>
                          <onup>Control.Move(100,1)</onup>
                          <ondown>Control.Move(100,1)</ondown>
                          <onleft>Control.Move(100,1)</onleft>
                          <onright>26300</onright>
                    </control>
                </control>
            </itemlayout>
            <focusedlayout height="225" width="1100">
                <control type="group">        
                    <control type="label">
                        <left>90</left>
                        <top>170</top>
                        <width>320</width>
                        <height>25</height>
                        <textcolor>FF00ffff</textcolor>
                        <shadowcolor>ff000000</shadowcolor>
                        <font>font12</font>
                        <align>center</align>
                        <label>$INFO[ListItem.Property(Name)]</label>
                        <scroll>True</scroll>
                        <scrollspeed>55</scrollspeed>                        
                    </control>                
                    <control type="image">
                        <left>170</left>
                        <top>25</top>
                        <width>150</width>
                        <height>150</height>
                        <background>True</background>
                        <aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
                        <texture>$INFO[ListItem.Property(Texture1)]</texture>
                    </control>
                    <control type="label">
                        <left>425</left>
                        <top>170</top>
                        <width>320</width>
                        <height>25</height>
                        <textcolor>FF00ffff</textcolor>
                        <shadowcolor>ff000000</shadowcolor>
                        <font>font12</font>
                        <selectedcolor>green</selectedcolor>
                        <align>center</align>
                        <label>$INFO[ListItem.Property(Name)]</label>
                        <scroll>True</scroll>
                        <scrollspeed>55</scrollspeed>                            
                    </control>                    
                    <control type="image">
                        <left>510</left>
                        <top>25</top>
                        <width>150</width>
                        <height>150</height>
                        <background>True</background>
                        <aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
                        <texture>$INFO[ListItem.Property(Texture2)]</texture>
                    </control>                
                    <control type="button" id="100">
                          <description>My first button control</description>
                          <left>905</left>
                          <top>100</top>
                          <width>80</width>
                          <height>80</height>
                          <visible>true</visible>
                          <colordiffuse>FFFFFFFF</colordiffuse>
                          <texturefocus colordiffuse="button_focus">buttons/button-fo.png</texturefocus>
                          <texturenofocus>buttons/dialogbutton-nofo.png</texturenofocus>
                          <label>$NUMBER[1]</label>
                          <wrapmultiline>true</wrapmultiline>
                          <font>font32_title</font>
                          <textcolor>FFFFFFFF</textcolor>
                          <focusedcolor>FFFFFFFF</focusedcolor>
                          <disabledcolor>80FFFFFF</disabledcolor>
                          <invalidcolor>FFFFFFFF</invalidcolor>
                          <align>center</align>
                          <aligny>center</aligny>
                          <textoffsetx></textoffsetx>
                          <textoffsety></textoffsety>
                          <pulseonselect>True</pulseonselect>
                          <onclick>ActivateWindow(1100)</onclick>
                          <onfocus></onfocus>
                          <onunfocus></onunfocus>
                          <onup></onup>
                          <ondown></ondown>
                          <onleft></onleft>
                          <onright>26300</onright>
                    </control>                    
                    <control type="button" id="200">
                          <description>My first button control</description>
                          <left>985</left>
                          <top>100</top>
                          <width>80</width>
                          <height>80</height>
                          <visible>true</visible>
                          <colordiffuse>FFFFFFFF</colordiffuse>
                          <texturefocus colordiffuse="button_focus">buttons/button-fo.png</texturefocus>
                          <texturenofocus>buttons/dialogbutton-nofo.png</texturenofocus>
                          <label>$NUMBER[2]</label>
                          <wrapmultiline>true</wrapmultiline>
                          <font>font32_title</font>
                          <textcolor>FFFFFFFF</textcolor>
                          <focusedcolor>FFFFFFFF</focusedcolor>
                          <disabledcolor>80FFFFFF</disabledcolor>
                          <invalidcolor>FFFFFFFF</invalidcolor>
                          <align>center</align>
                          <aligny>center</aligny>
                          <textoffsetx></textoffsetx>
                          <textoffsety></textoffsety>
                          <pulseonselect>True</pulseonselect>
                          <onclick>ActivateWindow(1100)</onclick>
                          <onfocus></onfocus>
                          <onunfocus></onunfocus>
                          <onup></onup>
                          <ondown></ondown>
                          <onleft></onleft>
                          <onright>26300</onright>
                    </control>
                </control>
            </focusedlayout>
Reply
#2
I may found a solution myself, would it be a solution to use a "nested" Panel Control for this? Using a new Panel for the two buttons inside the focuseditemlayout of the Outer-Panel. So to say, having an Outer Panel and in its itemlayout an Inner-Panel.
Reply
#3
I cannot focus the inner Panel Items...Is there any talanted dev/skinner around that could help me?
Is it possible to focus Items of an Inner-Panel at all?

Would ControlGroup.Visible(panelID, 1) help?
Reply
#4
No, you can't have lists inside lists.

An image of what you're trying to achieve might help.
Reply
#5
Hitcher, thanks for your reply and time. All i am trying to do is this:

Think of an Video Thumb totally to the left of the Panel, and to its right, three numbers: 1 2 3
The reason for this three numbers is that i want the user to be able to start the Video at a specific time, so clicking 1 = 15min start time, 2 = 30 min start time. Clicking the whole item is 0s start time.

_____________________________________________________PANEL ITEM 1_____________________________________________
Image          1                    2                   3
_________________________________________PANEL ITEM 2____________________________________________
PictureThumb     1      2     3
_________________________________________PANEL ITEM 3____________________________________________
PictureThumb     1      2      3
_________________________________________PANEL ITEM 3____________________________________________
.......

I just need the whole Item focusable (works since its the outer panel) and while in the panel having the Item focus, also be able to select 1,2,3 to start at a diff time.

I dont have to use a panel for the main items, but a panel seems nice to me Wink Whatever makes this possible i would be very happy for a hint.
Reply
#6
The reason why i dont just use a second panel beside the PictureThumb is, of course, because it wont scroll with the first panel:

Panel1(PictureThumb) Panel2(Buttons 1,2,3)

Is it maybe possible to let the Panel2 scroll with the Panel1, when using <onfocus> in Panel1 make the corresponding Item in Panel2 also focused/scrolling?
Reply

Logout Mark Read Team Forum Stats Members Help
Using a Button in a Panel Control0