Derma Menu buttons appear behind frame

The code I created:
Screenshots of the issue: - The Menu frame shows - The buttons after I closed the frame…

There was no errors or anything in the console, is there an issue?

You’re trying to set the parent to a string, which is not a valid panel.

Well with out the SetParent( “tmenu” ) the buttons won’t show when I call the frame.

Any tips?

like I said, you’re trying to set the parent of a panel to a non-panel type. So it’s defaulting to not having a parent.

This for some reason doesn’t show the button when I call the menu frame…

local DButton1 = vgui.Create( 'DButton', tmenu )

This is probably because you’re trying to position the button absolutely to the screen. When something is parented, the position is local to the parent’s origin.

Well if I remove:

DButton1:SetPos(1741, 241)

Then the button doesn’t show, even if the button is paranted to the frame.

So there’s something off here, question is what.

Edit: Guess it has something to do with the way I parent the button to the frame.

Edit 2: Well in the wiki itself the:

DButton:SetParent( frame )

Is shown without quotations and when I try to do that, the button’s don’t show up…


DButton1:SetPos(1741, 241)


DButton1:SetPos(25, 25)