Stay organized with collections
Save and categorize content based on your preferences.
blockly > icons > Icon > setTooltip
Sets the tooltip for this icon to the given value. Null to show the tooltip of the block.
Signature:
setTooltip(tip: tooltip.TipInfo | null): void;
Parameters
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetTooltip\u003c/code\u003e method allows customization of the tooltip displayed for an icon.\u003c/p\u003e\n"],["\u003cp\u003eTooltips can be set to a specific \u003ccode\u003eTipInfo\u003c/code\u003e object or revert to displaying the block's default tooltip by setting it to null.\u003c/p\u003e\n"],["\u003cp\u003eCalling this method with a \u003ccode\u003eTipInfo\u003c/code\u003e object updates the icon's tooltip to the information contained in the object.\u003c/p\u003e\n"],["\u003cp\u003eUsing null as the \u003ccode\u003etip\u003c/code\u003e argument resets the icon's tooltip to inherit and display the tooltip from the associated block.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [icons](./blockly.icons_namespace.md) \\\u003e [Icon](./blockly.icons_namespace.icon_class.md) \\\u003e [setTooltip](./blockly.icons_namespace.icon_class.settooltip_1_method.md)\n\nicons.Icon.setTooltip() method\n------------------------------\n\nSets the tooltip for this icon to the given value. Null to show the tooltip of the block.\n\n**Signature:** \n\n setTooltip(tip: tooltip.TipInfo | null): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|-----------------------------------------------------------------------------|-------------|\n| tip | [tooltip.TipInfo](./blockly.tooltip_namespace.tipinfo_typealias.md) \\| null | |\n\n**Returns:**\n\nvoid"]]