P.RichText.GetNumLines

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:GetNumLines( )
Description:
Returns the number of lines the element has.
Returns: nil
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=P.RichText.GetNumLines]P.RichText.GetNumLines [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionReturns the number of lines the element has and prints it to console.
Used onNewerClient.png
Code
local Text=vgui.Create( 'RichText' )
for i = 1,100 do Text:AppendText( "Long text\n" ) end
print(Text:GetNumLines())
 
Output100
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox