I am trying to create a Derma Menu, but for some odd reason I can’t set the DFrame as Parent to the DButton.
Now the button only shows when I set
local b1 = vgui.Create( 'DButton', 'base' )//Only when the *base* is in quotes the button shows up, without quotes it doesn't
Here’s the code I created:
function ph_tm_p1() local base = vgui.Create( 'DFrame' ) //Menu Frame base:SetSize(176, 571) base:SetPos(1728, 208) base:SetTitle('Taunts') base:SetDeleteOnClose(false) base:ShowCloseButton(false) base:MakePopup() local b1 = vgui.Create( 'DButton', 'base' ) //Button1 b1:SetSize(150, 33) b1:SetPos(1741, 241) b1:SetText('Button1') b1.DoClick = function() end end concommand.Add("phtm",ph_tm_p1)
I even tried:
b1:SetParent( base ) //Button didn't show. b1:SetParent( "base" ) //Button showed, but wasn't a part of the DFrame.
Could you give me a hint about he mistake I am doing?