Control.SetFocus(id,position) is not working for panel?
#16
It is sometimes hard to help when the other party is not open to suggestions Smile

If you're making skin for yourself - disable .. in settings. If it is for community do not enforce hacks (that you can not fully control).
My skins:

Amber
Quartz

Reply
#17
(2012-04-18, 08:59)pecinko Wrote: If you're making skin for yourself - disable .. in settings. If it is for community do not enforce hacks (that you can not fully control).

You again missed the point.

This thread is about how to focus the first actual item in the list no matter the item ".." is visible or is not visible.

Thanks.

Reply
#18
(2012-04-18, 09:14)slinuxgeek Wrote:
(2012-04-18, 08:59)pecinko Wrote: If you're making skin for yourself - disable .. in settings. If it is for community do not enforce hacks (that you can not fully control).

You again missed the point.

This thread is about how to focus the first actual item in the list no matter the item ".." is visible or is not visible.

Thanks.

No need to thank me for missing the point (from your point of view) Smile

Good luck with hacks!
My skins:

Amber
Quartz

Reply
#19
As much as I hate these sort of hacks somthing like
PHP Code:
<onload condition="stringcompare(ListItem.Label,..)">Down</onload

And if you really want to specialize it for each individual panel try something like for lists
PHP Code:
<onload condition="stringcompare(ListItem.Label,..) + Control.IsVisible(blah blah blah)">Down</onload
and for panels
PHP Code:
<onload condition="stringcompare(ListItem.Label,..) + Control.IsVisible(blah blah blah)">left</onload
where "blah blah blah" is your id numbers

though this may not work and I haven't tested it because ListItem.Label may not be filled yet on window load
Reply
#20
If Jezz_X solution is not working, add a button to your focusedlayout:

PHP Code:
<control type="button">
    <
onfocus condition="stringcompare(Container(XX).ListItem.Label,..) + IsEmpty(FocusFirstItem)">action</onfocus>
    <
onfocus condition="IsEmpty(FocusFirstItem)">SetProperty(FocusFirstItem,1)</onfocus>
</
control

Where XX is the id of the list or panel control (could work with just ListItem.Label but I'm not sure) and action is right or down, Control.Move(XX,1) should also work.

You also have to clear the property on unload:

PHP Code:
<onunload>ClearProperty(FocusFirstItem,videolibrary)</onunload
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Control.SetFocus(id,position) is not working for panel? 1