Hey !
I have a little problem with my DTextEntry : I want to center align my text in my textbox...
I have this :
[IMG]http://puu.sh/auEiI/b15462be61.png[/IMG]
and i want this :
[IMG]http://puu.sh/auEkt/e4a6a76f76.png[/IMG]
How i can do that ?
Thx !
When i tried to do something like that, i overrided the Paint function, actually i weren't able to select the text
Is this even possible? I'm pretty sure the text inside the text entry is all handled in the engine.
However, you can try a real hacky workaround by using this '[URL="http://wiki.garrysmod.com/page/VGUI/Elements/DTextEntry/OnValueChange"]DTextEntry:OnValueChange()[/URL]' and adding spaces appropriately to try and push your actual text into the centre.
You can use PaintOver with what Braden said and align it with something like
[code]
draw.DrawText(DTextEntry:GetValue(), "DermaLarge", 0, 0, Color(255, 255, 255), TEXT_ALIGN_CENTER)
[/code]
however if it gets too long it won't really work out..