Button inside a focusedlayout ?
#1
Hello,
I'm trying to put a button control inside the <itemlayout> and <focusedlayout> of a scroller but i have got a strange behavior,

The item which is being repeated consist of a label and a button so basically and to keep the code short its something like this:
<!-- etc -->'s are the bits removed to keep it short

PHP Code:
<control type="panel" id="61">
    <!-- 
etc -->
    <
itemlayout height="62" width="285">
        <
control type="label">        
            <!-- 
etc -->
            <
info>ListItem.Label</info>
        </
control>
        
        <
control type="button">
            <!-- 
etc -->
            <
texturefocus>ButtonFocus.png</texturefocus>
            <
texturenofocus>ButtonNoFocus.png</texturenofocus>
        </
control>
    </
itemlayout>
    
    <
focusedlayout height="62" width="285">
        <
control type="label">        
            <!-- 
etc -->
            <
info>ListItem.Label</info>
        </
control>
        
        <
control type="button">
            <!-- 
etc -->
            <
texturefocus>ButtonFocus.png</texturefocus>
            <
texturenofocus>ButtonNoFocus.png</texturenofocus>
        </
control>
    </
focusedlayout>
</
control

The strange behavior is that the button gets the focus image once i enter the mouse cursor inside the focusedlayout canvas ( even if i hover over the label the button still gets focused ) :S

How do i narrow down the focus canvas of the button to the button it self not the whole Item ?

I hope i explained it well Big Grin
Thanks.
I wrote a program to program my program ! - programception.
Reply
#2
To be honest I'd be surprised if you get it work at all how you like (I mean clicking) jmarshall did some work on being able to put focusable stuff in lists a long time ago for boxee but it never really worked well and didn't really get to a working point
Reply
#3
Wouldn't it be better to use static content for the list and fill it with your info and onclick items?
Reply
#4
@Jezz: Hmm Sad isn't there a way around it, i mean what would you do if you wanted to repeat a button or a group of buttons by either using lists or not it just need to be generated from python - like a list -, Thanks though.

@Hitcher: Yes, it would but i intend to add more buttons next to that label so i can't tell which onClick came from which button/control, right !

Thanks.
I wrote a program to program my program ! - programception.
Reply

Logout Mark Read Team Forum Stats Members Help
Button inside a focusedlayout ?0