What would I use to make a big text box? Like DLabel, but to fill up a lot.. I am making a menu, and I need this for the rules page. And I do not want to use DImage.
Thanks
-Kyle
You would use a DFrame or DPanel, and then in the Paint function you use the draw.DrawText function. Basically, you just use a font that's large enough to suit your needs.
Maybe you would want to make a DTextEntry, set it's text with :SetText(), and :SetEditable(false). Then if you didn't like the background you could override a paint function.
Woops, Entoros posted while I was posting lol.
[QUOTE=yakahughes;18036488]Maybe you would want to make a DTextEntry, set it's text with :SetText(), and :SetEditable(false). Then if you didn't like the background you could override a paint function.
Woops, Entoros posted while I was posting lol.[/QUOTE]
Do DTextEntries allow for different fonts? I forget.
Don't think so.
Thanks, works great!
Or you could just use a DLabel...
[lua]
local Text = [[Multi lined string here.
The double square brackets allow for more than one line using
no "/n" or whatever.]]
local Label = vgui.Create("DLabel")
Label:SetText(Text)
Label:SizeToContents()
[/lua]
I found what you are looking for:
[lua]
local Label = vgui.Create("DLabel")
Label:SetText("Lots of lineessssss")
Label:SizeToContents()
Label:SetMultiline( true )
[/lua]
Sorry, you need to Log In to post a reply to this thread.