• how do i size with the parent derma menu
    3 replies, posted
I was wondering this because i tried using, GetWide, and Get Tall, and it didn't fix the problem. :/
Try [url=http://wiki.garrysmod.com/?title=Panel.StretchToParent]this[/url] [editline]04:10PM[/editline] Or you could get the [url=http://wiki.garrysmod.com/?title=Panel.GetParent]parent[/url] and check it's size.
Doesn't seem to work, I tried this [code] 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) [/code] 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]
Sorry, you need to Log In to post a reply to this thread.