A newer version of this page is available. Switch to the current version.

ToolTipController.BeforeShow Event

Enables you to customize the text and settings of the tooltip before displaying it onscreen.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v19.1.dll

Declaration

[DXCategory("Events")]
public event ToolTipControllerBeforeShowEventHandler BeforeShow
<DXCategory("Events")>
Public Event BeforeShow As ToolTipControllerBeforeShowEventHandler

Event Data

The BeforeShow event's data class is ToolTipControllerShowEventArgs. The following properties provide information specific to this event:

Property Description
AllowHtmlText Gets or sets whether HTML formatting tags can be used to format the tooltip's text.
Appearance Gets the tooltip's appearance settings. This property is not in effect for SuperToolTip objects.
AppearanceTitle Gets the appearance settings used to paint the tooltip's title. This property is not in effect for SuperToolTip objects.
AutoHide Gets or sets whether the tooltip is hidden after a specific time ellapses.
IconSize Gets the size of the predefined icon to display in the tooltip.
IconType Gets or sets the kind of predefined icons to display in the tooltip.
ImageIndex Gets or sets the index of an image from the ToolTipControllerShowEventArgs.ImageList to display in the tooltip.
ImageList Gets or sets the source of images that can be displayed within tooltips.
ObjectBounds Gets or sets the bounds of the current object for which a tooltip is displayed.
RightToLeft Gets or sets whether a tooltip's visual elements are aligned to support locales using right-to-left fonts.
Rounded Gets or sets whether the tooltip window has rounded corners.
RoundRadius Gets or sets the radius of the rounded corners of the tooltip window.
SelectedControl Gets or sets the control for which a tooltip controller's event is fired. Inherited from ToolTipControllerEventArgsBase.
SelectedObject Gets or sets the element of the control for which the tooltip should be displayed. Inherited from ToolTipControllerEventArgsBase.
Show Gets or sets whether the tooltip should be displayed.
ShowBeak Tests whether callout beaks are displayed for hints.
SuperTip Gets or sets a SuperToolTip.
Title Gets or sets the regular tooltip's title.
ToolTip Gets or sets the text for the regular tooltip.
ToolTipAnchor Gets or sets whether the tooltip is anchored relative to the mouse pointer or relative to the editor.
ToolTipImage Gets or sets the image to display within the current tooltip.
ToolTipIndent Gets or sets the space, in pixels, between the tooltip and the associated visual element.
ToolTipLocation Gets or sets the location of the tooltip window relative to the position where the tooltip should appear.
ToolTipStyle Gets or sets the look-and-feel settings of the regular tooltip displayed.
ToolTipType Gets or sets the type of tooltip to be displayed.

The event data class exposes the following methods:

Method Description
Equals(Object) Determines whether two objects are equal.
GetHashCode() Gets the hash code (a number) that corresponds to the value of the current object.
GetToolTipLocation() Gets the actual location of the tooltip window relative to the position where the tooltip should appear.

Remarks

The BeforeShow event occurs before displaying tooltips on screen. The event's parameter provides access to properties that specify the text to display, and the settings defining the tooltip's look and feel. These properties correspond to members of the ToolTipController class.

You can use the event's parameter to change the text and appearance of the tooltip and to specify whether the tooltip should be displayed.

The size of the tooltip window is calculated automatically based on the tooltip text which is specified by the ToolTipControllerShowEventArgs.ToolTip property. However, you can handle the ToolTipController.CalcSize event to modify the size and location of the window. This event is fired after the BeforeShow event.

If a tooltip window's size if modified via the ToolTipController.CalcSize event, the text doesn't automatically refit into the new size. To fit the text into the new size, custom paint the text as required, by handling the ToolTipController.CustomDraw event.

See Also