Garry's Mod Wiki

DTextEntry:SetHistoryEnabled

  DTextEntry:SetHistoryEnabled( boolean enable )

Description

Enables or disables the history functionality of DTextEntry. This allows the player to scroll through history elements using up and down arrow keys.

See DTextEntry:AddHistory.

Arguments

1 boolean enable
Whether to enable history or not.

Example

A common example.

local textentry = vgui.Create("DTextEntry") textentry:SetHistoryEnabled(true) textentry.History = { "Message 1", "Message 2" }