Control.SetFocus(id,position) is not working for panel?

  Thread Rating:
  • 1 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
slinuxgeek Offline
Senior Member
Posts: 194
Joined: Feb 2012
Reputation: 0
Post: #11
I agree but it is not working even first time when CommonRootView_Info is the first view.

Also when drill down deeper into the folders (ie Albums, Songs) I want it to work in the same way ,
this will not work here because of <onload> because window is already loaded but then there should be some other way.

Thank You.
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,976
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #12
Best to forget about it and let the user decide if they want to hide the parent folder item altogether.

[Image: sig_zps3af3b48e.jpg]
find quote
slinuxgeek Offline
Senior Member
Posts: 194
Joined: Feb 2012
Reputation: 0
Post: #13
Sad Sad
find quote
`Black Offline
Skilled Skinner
Posts: 2,070
Joined: Apr 2009
Reputation: 51
Location: Germany
Post: #14
Why do you want to force users to have ".." hidden? You shouldn't do that, everyone can disable it in the settings if he doesn't need it. Just add this to your skin description that you have your own buttons for going back and users should hide parent folder items if they want the best skin experience.

[Image: xp1080-21.png]
find quote
slinuxgeek Offline
Senior Member
Posts: 194
Joined: Feb 2012
Reputation: 0
Post: #15
OK `Black .

Oh wait this thread was not about hiding the ".." item but , it was about how to highlight the first actual item when user enters the window.
instead of highlighting ".." the item next to ".." should be focused / highlighted .
If ".." is not there (hidden by user) no problem , the first actual item should be focused always.

Please help , I need it.
(This post was last modified: 2012-04-18 06:47 by slinuxgeek.)
find quote
pecinko Offline
Member+
Posts: 3,067
Joined: Dec 2008
Reputation: 29
Location: Prague / Belgrade
Post: #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:

Quartz
Amber
find quote
slinuxgeek Offline
Senior Member
Posts: 194
Joined: Feb 2012
Reputation: 0
Post: #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.
find quote
pecinko Offline
Member+
Posts: 3,067
Joined: Dec 2008
Reputation: 29
Location: Prague / Belgrade
Post: #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:

Quartz
Amber
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,269
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #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

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
`Black Offline
Skilled Skinner
Posts: 2,070
Joined: Apr 2009
Reputation: 51
Location: Germany
Post: #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: xp1080-21.png]
(This post was last modified: 2012-04-18 13:44 by `Black.)
find quote
Post Reply