I tried your changes but still doesn't work.
Lua Code:
local panel = CreateFrame("Frame");
panel.name = "MyAddOn";
-- Create the scrolling parent frame and size it to fit inside the texture
local scrollFrame = CreateFrame("ScrollFrame", nil, panel, "UIPanelScrollFrameTemplate");
scrollFrame:SetPoint("TOPLEFT", panel, "TOPLEFT", 3, -4);
scrollFrame:SetPoint("BOTTOMRIGHT", panel, "BOTTOMRIGHT", -27, 4);
-- Create the scrolling child frame, set its width to fit, and give it an arbitrary minimum height (such as 1)
local scrollChild = CreateFrame("Frame", nil, panel);
scrollFrame:SetScrollChild(scrollChild);
scrollChild:SetWidth(InterfaceOptionsFramePanelContainer:GetWidth()-18);
scrollChild:SetHeight(1);
-- Add widgets to the scrolling child frame as desired
local title = scrollChild:CreateFontString("ARTWORK", nil, "GameFontNormalLarge");
title:SetPoint("TOP", scrollChild, "TOP");
title:SetText("MyAddOn");
local footer = scrollChild:CreateFontString("ARTWORK", nil, "GameFontNormal");
footer:SetPoint("TOP", scrollChild, "TOP", 0, -5000);
footer:SetText("This is 5000 below the top, so the scrollChild automatically expanded.");
InterfaceOptions_AddCategory(panel);