how do i size with the parent derma menu

I was wondering this because i tried using, GetWide, and Get Tall, and it didn’t fix the problem. :confused:

Try this

[editline]04:10PM[/editline]

Or you could get the parent and check it’s size.

Doesn’t seem to work, I tried this




local Panel = vgui.Create( "DFrame" )
Panel:SetSize(500, 326)
Panel:SetTitle("")
Panel:SetVisible(false)
Panel:Center()
Panel:SetSizable(true)

local PSheet = vgui.Create( "DPropertySheet" )
PSheet:SetParent(Panel)
PSheet:SetPos(0, 26)
--PSheet:SetSize(Panel:GetWide(), Panel:GetTall()-46)
PSheet:StretchToParent(0, 26, 0, 0)



But all it did was basically set the size.

Use this:
[lua]local TestElement = vgui.Create( “DComboBox”, Frame )
TestElement.Think = function()
TestElement:StretchToParent( 4, 54, 4, 4 )
end[/lua]