Garry's Mod Wiki

Revision Difference

DTooltip#552281

<panel> <parent>DLabel</parent> <realm>Client and Menu</realm>⤶ <description> <internal></internal> ⤶ The panel used internally for tool tips. See <page>Panel:SetTooltip</page>. <internal></internal> ⤶ The panel used internally for tool tips. See <page>Panel:SetTooltip</page>. </description> ⤶ </panel>⤶ </panel>⤶ <example> <description>Drawing a Tool Tip manually, then painting over it.</description> <code> local DFrame = vgui.Create( "DFrame" ) DFrame:SetPos( 100, 100 ) DFrame:SetSize( 100, 100 ) local DTooltip = vgui.Create( "DTooltip" ) DTooltip:SetPos( 0, 0 ) DTooltip:SetSize( 250, 50 ) DTooltip:SetText( "Manual Tooltip" ) DTooltip:OpenForPanel( DFrame ) DTooltip:PositionTooltip() DTooltip.Paint = function() draw.RoundedBox( 5, 0, 0, 250, 50, Color( 255, 255, 255, 255 ) ) end </code> </example>