Kodi Community Forum
suppress dialog close after <onclick> - 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: suppress dialog close after <onclick> (/showthread.php?tid=35878)



suppress dialog close after <onclick> - Jeroen - 2008-08-14

I have a dialog window with a grouplist positioned on the left. The grouplist has buttons in it which set visibility and focus to one of other grouplists by using an <onright> action. Which secondary grouplist is called is dependant on which of the buttons in the left grouplist is focused.
All this works fine.
However for one of those buttons on the left I wish to have an <onclick> action which does the same as the <onright> action, which is call the secondary grouplist.
It looks as though using SetFocus() to the grouplist does work, however it also closes the dialog window. Is there a way to get around this and suppress the dialog close action?

I think I remember reading a thread with a similar question but I can't seem to find it.


- jmarshall - 2008-08-14

You're probably using a buttonmenu type of dialog? This closes on any <onclick>. Switch it to a standard dialog should do the trick.

Cheers,
Jonathan


- Jeroen - 2008-08-14

Yeah it concerns the shutdownmenu. making it a standard dialog still closes it though. Would the fact that this is not an added dialog but a built in be of any relevance?

I made an error in my description btw, the left menu is a regular control group, not a grouplist.


- jmarshall - 2008-08-14

Correct. There's no way around it that I can think of.


- Jeroen - 2008-08-14

Aahh...bummer

Oh well, I'll see what I can come up with as an alternative.

Thanks Smile


- CHI3f - 2008-08-14

Could you change it's window type from dialog to window? Wouldn't that stop making it close when an onclick was executed?


- jmarshall - 2008-08-14

I'm pretty sure the close is done within the code for that window.


- CHI3f - 2008-08-14

He could code a textureless button in the shutdown menu which has a <onfocus> set to open a custom window. That way this custom window could be opened when the shutdown menu button is pressed.


- Jeroen - 2008-08-14

Changing to regular Window closes the window too.

Opening a custom dialog from the shutdown menu would indeed be an option. Another option would be to use a selectbutton to flip through the options. I would have to visually seperate it from the list though in order to not make it look weird-ish. I'll have to think about it.

thanks