Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
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.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
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
Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
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.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Correct. There's no way around it that I can think of.
Posts: 217
Joined: Jan 2007
Reputation:
0
CHI3f
Team-XBMC Skinner
Posts: 217
Could you change it's window type from dialog to window? Wouldn't that stop making it close when an onclick was executed?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
I'm pretty sure the close is done within the code for that window.
Posts: 217
Joined: Jan 2007
Reputation:
0
CHI3f
Team-XBMC Skinner
Posts: 217
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.
Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
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