Derma Question.

Well, i’m working on a Derma and i need to set a texts size, i can’t seem to find the right function. I’ve tried everything.

DLabel:SetSize(40) Doesn’t work, neither does

You mean as the text itself or the area the text is in?

For text size, I’d take a look at **[Surface.CreateFont](**

For the size of the ‘box’ the text is in, you could always use **[Panel.SizeToContents](**

So, I would make a Surface.CreatFont with the example shown on the Wiki page, then make a DLabel that sets the font to, in my case, “coolvetica”

That didn’t work.

Excuse my stupidity, i’m fairly new to Derma. I figured that it was CV20. Thanks.

Quick question, where in that example is the size function?

Argument two

Tried changing the value right next to the font name but nothing happens, am i doing something wrong?

This here works. (Im using it myself)

local Text = vgui.Create( “DLabel”, smenu )-- Change smenu to your DPanel
Text:SetText( “Put your text here
– Doing that goes to next line.!” ) – Test to be displayed
Text:SetPos( 190, 350 ) – The pos of the text
Text:SetFont( “Trebuchet24” )
Text:SetTextColor( Color( 255,102,0,255 ) ) – Color of text
Text:SizeToContents() – You NEED this!

Go here for a list of fonts:

Thanks guys, got it working.