Panel.AppendText
From GMod Wiki
Function | |
Syntax | Panel:AppendText( String text ) |
Description: | |
Appends text to the panel | |
Returns: | nil |
In Object: | Panel |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Panel.AppendText]Panel.AppendText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Additional Notes
- Only appends, you need to change line manually.
- Handy helper override (if you don't know what and how it does what it does, don't use):
-- We don't want a newline appended right away as it takes an empty line, so we hack it up. local appendNL=false local AppendText=yourcontrol.AppendText function yourcontrol:AppendText(txt) if appendNL then txt='\n'..txt end if txt:sub(-1)=="\n" then appendNL=true txt = txt:sub(1,txt:len()-1) else appendNL=false end AppendText(self,txt) end