Kodi Community Forum

Full Version: Refresh window .
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a vertical wraplist, I can move the items up and down but I what to have a button and when I press it I want the items form the list to come back to the initial position.
I used <onclick>XBMC.ReloadSkin()</onclick> , it worked but the process is very slow. Is any function I can use to do that ? Something like refreshWindow?
You could try Container.Refresh but I'm not sure if that moves focus to the first item.
It doesn't work. Thanks.
Will the initial position always be the same? Wouldn't this

Control.SetFocus(id,position)
Will make a list with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)



do what you mean?
I think you understand something else.

This is the list when i enter in the app:

Image

Then i move the items and it look like that for example:

Image

I want when i press the button "Test" the list to look like in the first pictures.
@Jeroen: I think that doesn't work for wraplists. Might be able to use Control.Move with some variables.
(2015-02-24, 13:11)georgecristian Wrote: [ -> ]I think you understand something else.
Nope, that's what I thought you meant.

(2015-02-24, 13:12)Sranshaft Wrote: [ -> ]@Jeroen: I think that doesn't work for wraplists. Might be able to use Control.Move with some variables.
Oh, you could be right about that. Then move + variables should work yeah.
Thanks @Sranshaft. I made something like that (<onclick condition="StringCompare(Container(300).ListItem.Label,Videos)">Control.Move(300,4)</onclick>) and it's working for what i have.
(2015-02-24, 13:44)Jeroen Wrote: [ -> ]
(2015-02-24, 13:11)georgecristian Wrote: [ -> ]I think you understand something else.
Nope, that's what I thought you meant.
(2015-02-24, 13:12)Sranshaft Wrote: [ -> ]@Jeroen: I think that doesn't work for wraplists. Might be able to use Control.Move with some variables.
Oh, you could be right about that. Then move + variables should work yeah.

Control.SetFocus only works for the items that are visible on screen - i.e. its relative, not absolute. For instance, Control.SetFocus(50,0) will only focus the first item on the current *page* of the list, not the absolute first item in the list. It doesnt work for wrap/fixed lists because they have a fixed focus position..
Anyone know how to execute something when a window is opened? I can use this (<onclick condition="StringCompare(Container(300).ListItem.Label,Videos)">Control.Move(300,4)</onclick>) on a button but I want to use it without a button, i don't want to touch the screen and the command to be "executed".

I don't find anything in the manual and my experience didn't help me.