Kodi Community Forum
Close a window? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Close a window? (/showthread.php?tid=282470)



Close a window? - Dzrte4gle - 2016-07-12

How do you close a window, not a dialog?


RE: Close a window? - Dzrte4gle - 2016-07-12

It displays the previous window first. How do you make it go directly to a window?


RE: Close a window? - sualfred - 2016-07-12

Again, you should read the wiki Tongue

http://kodi.wiki/view/List_of_built-in_functions

-> ActivateWindow(window[,dir,return])
-> ReplaceWindow(window,dir)


RE: Close a window? - Dzrte4gle - 2016-07-13

All of the Windows are using ReplaceWindow with return at the end. And it still displays the previous window first. I also tried ActivateWindow with ReplaceWindow and get the same results. I even tried the Action(Close) and still the previous window, opens for some seconds and then I get the other window.


RE: Close a window? - Hitcher - 2016-07-13

Code?


RE: Close a window? - Dzrte4gle - 2016-07-13

ActivateWindow(window,dir,return) and then ReplaceWindow(window,dir,return) or
ReplaceWindow(window,dir,return) for all windows.


RE: Close a window? - BigNoid - 2016-07-13

You dont want to use the return parameter in this case.


RE: Close a window? - Dzrte4gle - 2016-07-13

In favourites XML there is no previous window showing. But in python, I have to remove " for it to work. And that's when I get the previous window appearing first. Does favourites XML use a different way in executing an xbmc built-in command? So for the Python it's ReplaceWindow(window,dir) and favourites is ReplaceWindow(window,"dir&quotWink


RE: Close a window? - Hitcher - 2016-07-14

Favourites is a dialog so there's always an underlying window.


RE: Close a window? - Andrea1998 - 2023-02-25

(2016-07-12, 13:14)sualfred Wrote: Again, you should read the wiki Tongue

http://kodi.wiki/view/List_of_built-in_functions

-> ActivateWindow(window[,dir,return])
-> ReplaceWindow(window,dir)
I saw that in the wiki there is no command to close a specific window, ex:
if I want to close a window with a specific ID, and this window is not a dialog, the only way to do it I think is the following:

xml:
ReplaceWindow(2109, )

(2109 is the ID of the window to close)

Is this the correct way to close a window or is there something I'm missing?


Thank you for your help.


RE: Close a window? - Hitcher - 2023-02-25

No, you need specify the window you want to show after closing (replacing) the current one. You can't just close a window because there would nothing on screen.


RE: Close a window? - Andrea1998 - 2023-02-25

@Hitcher

Ok, thanks for explaining me how it works.