Garry's Mod Wiki

Garry's Mod Wiki

  Panel:SetTooltip( string str = nil )

Description

Sets the tooltip to be displayed when a player hovers over the panel object with their cursor.

Arguments

1 string str = nil
The text to be displayed in the tooltip. Set nil to disable it.

Example

To disable tooltip set first argument to nil

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(nil) -- disable tooltip for this panel

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...