Using the ShowTooltip Method

Use the ShowToolTip method to add a tooltip to an interrogated control from a web or Windows application. This method is one of the general methods available for interrogated controls. A tooltip is a small rectangular pop-up window that displays a brief description of a control's purpose when the user rests the pointer on the control. See the  example automation using this method.

There are five overloads for this method:

1 parameter: String text

2 parameters: String text, String title

3 parameters: String text, String title, ToolTipIcon icon

5 parameters: String text, String title, ToolTipIcon icon, Color textColor, Color backgroundColor

7 parameters: String text, String title, ToolTipIcon icon, Color textColor, Color backgroundColor, ToolTipAnchorPosition anchorPosition, Int32 maxWidth

These parameters are defined as follows.




This is the text that is displayed in the Tooltip window. If this parameter is empty, the tooltip will not appear.


This is the title of the tooltip that is displayed at the top of the Tooltip window.


Determines whether or not an icon is displayed at the corner of the tooltip. Lets the user select between None, Info, Warning or Error. An icon will only appear if the text and title parameters are populated.


Determines the color of the text in the Tooltip window.


Determines the color of the background in the Tooltip window.


This parameter determines to which corner of the control’s rectangle the tooltip is attached. You can select Bottom Left, Bottom Right, or Top Right.  


Determines the number of characters per line of text.

Keep in mind...  


Example automation

The following automation displays a tooltip on an HTML table when the user clicks on the table. The tooltip is used to display Help for the table.



Privacy | Trademarks | Terms of Use | Feedback

Updated: 18 June 2020

© 2016 - 2020 Pegasystems Inc.  Cambridge, MA All rights reserved.


OpenSpan data classification label