The event handler receives an argument of type ToolTipControllerCalcSizeEventArgs containing data related to this event.
The following
ToolTipControllerCalcSizeEventArgs 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. |
SelectedObject |
Gets or sets the element of the control for which the tooltip should be displayed. |
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. |
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 CustomDraw event.
To change the tooltip text, you can handle the BeforeShow event. This event is fired before CalcSize.