ToolTip.ShowAlways Property

 

Gets or sets a value indicating whether a ToolTip window is displayed, even when its parent control is not active.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member ShowAlways : bool with get, set

Property Value

Type: System.Boolean

true if the ToolTip is always displayed; otherwise, false. The default is false.

With the ShowAlways property, you can display a ToolTip window even when the container of the ToolTip is not active. You can use this feature in a modeless window application to enable ToolTip windows to be displayed regardless of which modeless window is active. This feature is also useful when you want to create a control by using the UserControl, which contains a number of controls within it that display ToolTip windows. Because the UserControl is often not the active window on a form, setting this property to true enables the controls within the UserControl to display ToolTip windows at any time.

The following code example creates an instance of the ToolTip class and associates the instance with the Form that the instance is created within. The code then initializes the delay properties AutoPopDelay, InitialDelay, and ReshowDelay. In addition the instance of the ToolTip class sets the ShowAlways property to true to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a Button and a CheckBox. The code example requires that the method defined in the example is located within a Form that contains a Button control named button1 and a CheckBox control named checkBox1, and that the method is called from the constructor of the Form.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: