Hey guys, i have a problem with “DCategoryList” element on my journey learning gmod lua.
I m wondering how i could fill this element with content…
We have THIS in the gmod wiki, but it does not work for me, my parented panels are always displayed below the category bars and not inside as they should.
My code looks like this:
..... for k, v in SortedPairs( catarr ) do cat = vgui.Create( "DCategoryList", self ) cat:SetTall(450) cat:SetWide(cat:GetWide()) cat:Dock(FILL) cat:Add( k ) local IconList = vgui.Create( "DPanel", cat ) IconList:Dock(FILL) cat:AddItem( IconList ) for key, ent in SortedPairsByMemberValue( v, "order" ) do AddSpawnIcon(ent.name, ent.limit, ent.lvlrq, ent.vip, ent.price, ent.hint, ent.model, icon_size*ix, icon_size*iy, IconList) .....
The main frame is a “DScrollPanel” and the AddSpawnIcon function creates a “DModelPanel” with some draw functions for nice buttons.
This works well in other panels but not in my DCategoryList…
Can anyone tell me please what am i missing here?
THX in advance