WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Automatically expand interface options? (https://www.wowinterface.com/forums/showthread.php?t=57966)

MinguasBeef 04-25-20 02:07 PM

Automatically expand interface options?
 
I have it when I type in a slash command, that it pulls up the interface options for the main panel with

Code:

InterfaceOptionsFrame_OpenToCategory("Minguas Suite")
I have subcategories within this panel however, and I always have to manually expand this panel to see the others. Is there any way to have it automatically expand the panel to see the subcategories?

Thanks

SDPhantom 04-25-20 06:46 PM

The function takes either the exact string you set as panel.name, but can also take panel itself. I'd recommend calling it with the later to prevent name collisions.

Note: This works for both your main panel and your subcategory panels.
(See InterfaceOptionsFrame.lua:418)

Vrul 04-25-20 08:14 PM

Open to one of the subcategories first:
Code:

InterfaceOptionsFrame_OpenToCategory("Minguas Suite - Subcategory")
InterfaceOptionsFrame_OpenToCategory("Minguas Suite")

Obviously the first line will need to be changed to whatever your code is set up for but you should get the idea.

SDPhantom 04-26-20 11:11 AM

Quote:

Originally Posted by Vrul (Post 335768)
Code:

InterfaceOptionsFrame_OpenToCategory("Minguas Suite - Subcategory")

Unless the subcategory is actually named "Minguas Suite - Subcategory", it won't work. If it's named "Subcategory", then you have to refer to it as "Subcategory". This opens the possibility of name collisions since another addon may register that name as well. This is why you should pass the pointer to the panel itself instead.


All times are GMT -6. The time now is 02:08 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI