Skip to main content

ToolTipController.CalcSize Event

Enables you to specify the position and size of the tooltip window.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

[DXCategory("Events")]
public event ToolTipControllerCalcSizeEventHandler CalcSize

Event Data

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

Property Description
Position Gets or sets the coordinates of the top left tooltip corner.
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.
ShowInfo Gets the additional event data.
Size Gets or sets the tooltip dimensions.
Title Gets the tooltip’s title.
ToolTip Gets the text to be displayed within the tooltip.

Remarks

The CalcSize event occurs before a tooltip or SuperToolTip is dispalyed, and allows you to specify the position of the top left corner and the size of the tooltip window. By default, the ToolTipControllerCalcSizeEventArgs.Size parameter specifies the minimum size of the window needed to display the complete tooltip text.

After the tooltip window’s size has been modified via the CalcSize event, a SuperToolTip object being displayed, automatically fits into the new size. A regular tooltip doesn’t automatically fit into the new size. To fit a regular tooltip’s text into the tooltip window, you need to custom paint the text via the ToolTipController.CustomDraw event.

To change the tooltip text, you can handle the ToolTipController.BeforeShow event. This event is fired before CalcSize.

See Also