Panel/GetValue

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
In engine is only implemented for {{Type|CheckButton}}, {{Type|Label}} and {{Type|TextEntry}} as a string and for those elements has a hard coded limit of 8092 characters.
 
In engine is only implemented for {{Type|CheckButton}}, {{Type|Label}} and {{Type|TextEntry}} as a string and for those elements has a hard coded limit of 8092 characters.
  
{{Note|This function is limited to 8091 Bytes. Use {{ClassFunction|Panel|GetText}} for unlimited bytes.}}
+
{{Note|This function is limited to 8091 Bytes. If using {{Type|DTextEntry}}, use {{ClassFunction|Panel|GetText}} for unlimited bytes.}}
 
|Realm=Client
 
|Realm=Client
 
|IsClass=Yes
 
|IsClass=Yes

Revision as of 23:54, 3 January 2020

 Panel:GetValue( )

Contents

Description

Returns the value the panel holds.

In engine is only implemented for CheckButton, Label and TextEntry as a string and for those elements has a hard coded limit of 8092 characters.

NOTE

This function is limited to 8091 Bytes. If using DTextEntry, use Panel:GetText for unlimited bytes.

Returns

any

The value the panel holds.

Examples

Example

Returns the string typed in a TextEntry.

local TextEntry = vgui.Create( "TextEntry" )
TextEntry:SetText( "Hello world!" )
print( TextEntry:GetValue() )

Output:

"Hello world!"
Personal tools
Navigation