Loading lua Derma Components

Hello guys. How can I do to create a sheet with It own buttons and labels, then add to an sheet category in a different lua.

Something like

for loop here (checking the ammount of luas to add) do
CatList:AddSheet(“title”, sheetcategory that I created in a different lua)

I’m not sure if anyone understand what I want.

Make the CatList a global variable? Make sure you include/addcsluafile the necessary files.

Something like that. In Java I can create an object from the component and customize with my own functions

I create an object from the component Frame, put buttons (with functions) in there. Then add to a sheet category (with return). There’s anyway that I can do that?

You can create your own panels in Lua and load them into a panel that is open. When you create a new category, the category contents can be whatever panel you want ( as long as it isn’t designed to be opened on its own )…

Take a look at: SERVER/garrysmod/lua/vgui/
All pre-existing vgui panels are there.