WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   [TBC Beta] Expand Interface Category (https://www.wowinterface.com/forums/showthread.php?t=58742)

MinguasBeef 05-18-21 02:36 AM

[TBC Beta] Expand Interface Category
 
Found solution after posting. Needed to assign the hidden variable for the subpanels before calling InterfaceAddOnsList_Update.

I used to be able to do this on an older version of the game, but i'm running into issues on the TBC beta client.

I'm trying to collapse/expand a category through code.

Here is example code to create a category with one subcategory.

Code:

panel = CreateFrame("Frame")
panel.name = "Test Category"
InterfaceOptions_AddCategory(panel)

local subpanel = CreateFrame("Frame")
subpanel.name = "Sub Category"
subpanel.parent = panel.name
InterfaceOptions_AddCategory(subpanel)

Here is my code for trying to expand the category.
Code:

panel.collapsed = false
InterfaceAddOnsList_Update();

The "expand/collapse" button updates, but the subcategory visibility is not actually being updated here.

I also tried with
Code:

InterfaceCategoryList_Update();

Any ideas on how I can achieve this?


All times are GMT -6. The time now is 01:14 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI