Best way to add text to a vgui/derma panel

Hey Guys,

What would be the best way to add text to a vgui/derma panel?





  • Bump -


I think Panel.Paint would be a good way.

for text?

Yes, look at the example on the page.

function Frame4:Paint()
end That’s the example.
it fails because it removes the actual things behind it…


Dont worry.
used function PANEL:PaintOver()


Also what is the size list can i find that anywhere because it has DefaultSmall?

Use a DLabel. The Panel.Paint is used to paint your own custom things onto a panel separately. Only use Panel.Paint/Over to do your own art work on the panel, as in a temporary custom skin. Don’t use it/rely on it for things like labels etc, it will only make your code messy and harder to debug if some thing goes wrong.

How to set the colour?

If you go 14 lines down, or 2 up, where it has a list of all the methods you can call on the DLabel object, the link i specified in an earlier post stating you should use that instead, you will see a method called SetTextColour. When you click it it takes you to a page which gives you a very simple example of how to set the texts colour to white.

May I interest you in read the Color page?

You should really read the whole page, from top to bottom and try it out yourself before posting. Always have that open in your browser. And always search that first. This question is a no-brainer. And you’re not specifying what you want to color. Just read the wiki.

With DComboBox
can i make it so when you click a item it adds buttons?

myLabel:SetText( “Dealer: Yes, but i only sell them in pack’s of 10” )
it is only saying Dealer: Yes, but i only sell them in…
Why is it doing…!



Ok i need help now

Help Guys please!
i need suggestions on how 2 make my gunshop vgui
i made the dealer
i need it
Any ideas on how 2 do it?

Have you tried using 3 DLabels and a DButton?

Maybe that means i need to do it for all of em!


Is there a way i can make it do a list?
like on other Peoples roleplay?


Would there be any eaiser way?