Garry's Mod Wiki

Panel:GetValue

  any Panel:GetValue()

Description

Returns the value the panel holds.

In engine is only implemented for CheckButton, Label and TextEntry as a string.

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

Returns

1 any
The value the panel holds.

Example

Returns the string typed in a TextEntry.

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