Revision Difference
DTextEntry:OnGetFocus#515162
<function name="OnGetFocus" parent="DTextEntry" type="panelfunc">⤶
<ispanel>yes</ispanel>⤶
<description>Called whenever the DTextEntry gains focus.</description>⤶
<realm>Client</realm>⤶
</function>⤶
⤶
<example>⤶
<code>⤶
local dTextEntry = vgui.Create("DTextEntry")⤶
dTextEntry:SetText("Enter text here")⤶
⤶
dTextEntry.OnGetFocus = function()⤶
self:SetText("") -- Clear the text box for user input⤶
end⤶
</code>⤶
<output>Text entry clears when user clicks it to begin typing</output>⤶
⤶
</example>