View Single Post
04-30-23, 11:49 PM   #3
AeroMaxxD
An Aku'mai Servant
Join Date: Dec 2022
Posts: 33
I tried your changes but still doesn't work.

Lua Code:
  1. local panel = CreateFrame("Frame");
  2. panel.name = "MyAddOn";
  3.  
  4. -- Create the scrolling parent frame and size it to fit inside the texture
  5. local scrollFrame = CreateFrame("ScrollFrame", nil, panel, "UIPanelScrollFrameTemplate");
  6. scrollFrame:SetPoint("TOPLEFT", panel, "TOPLEFT", 3, -4);
  7. scrollFrame:SetPoint("BOTTOMRIGHT", panel, "BOTTOMRIGHT", -27, 4);
  8.  
  9. -- Create the scrolling child frame, set its width to fit, and give it an arbitrary minimum height (such as 1)
  10. local scrollChild = CreateFrame("Frame", nil, panel);
  11. scrollFrame:SetScrollChild(scrollChild);
  12. scrollChild:SetWidth(InterfaceOptionsFramePanelContainer:GetWidth()-18);
  13. scrollChild:SetHeight(1);
  14.  
  15. -- Add widgets to the scrolling child frame as desired
  16. local title = scrollChild:CreateFontString("ARTWORK", nil, "GameFontNormalLarge");
  17. title:SetPoint("TOP", scrollChild, "TOP");
  18. title:SetText("MyAddOn");
  19.  
  20. local footer = scrollChild:CreateFontString("ARTWORK", nil, "GameFontNormal");
  21. footer:SetPoint("TOP", scrollChild, "TOP", 0, -5000);
  22. footer:SetText("This is 5000 below the top, so the scrollChild automatically expanded.");
  23.  
  24. InterfaceOptions_AddCategory(panel);
  Reply With Quote