Revision Difference
Panel:SetTooltip#562636
<function name="SetTooltip" parent="Panel" type="classfunc">
<file line="301-L303">lua/includes/extensions/client/panel.lua</file>
<description>Sets the tooltip to be displayed when a player hovers over the panel object with their cursor.
</description>
<realm>Client and Menu</realm>
<args>
<arg name="str" type="string">The text to be displayed in the tooltip. Set false to disable it.</arg>
<arg name="str" type="string" default="nil">The text to be displayed in the tooltip. Set `nil` to disable it.</arg>
</args>
</function>
<example>
<description>To disable tooltip set first argument to false</description>
<code>
local frame = vgui.Create("DFrame")
frame:SetSize(96, 96)
frame:Center()
frame:MakePopup()
local icon = frame:Add("SpawnIcon")
icon:SetPos(0, 20)
icon:SetSize(64, 64)
icon:SetModel("models/props_junk/watermelon01.mdl")
icon:SetTooltip(false) -- disable tooltip for this panel
</code>
</example>