Skip to main content
A newer version of this page is available. .

BaseEdit.ToolTipAnchor Property

Gets or sets whether the tooltip is anchored relative to the mouse cursor or relative to the editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[DefaultValue(ToolTipAnchor.Default)]
[Browsable(true)]
[DXCategory("ToolTip")]
public override ToolTipAnchor ToolTipAnchor { get; set; }

Property Value

Type Default Description
DevExpress.Utils.ToolTipAnchor **Default**

A DevExpress.Utils.ToolTipAnchor value that specifies whether the tooltip is anchored relative to the mouse cursor or relative to the editor. By Default, the behavior depends on the ToolTipController.ToolTipAnchor property.

Remarks

Tooltips for editors can be specified using the BaseControl.SuperTip and BaseControl.ToolTip properties. When displayed, tooltips are aligned according to the ToolTipController.ToolTipLocation setting relative to the anchor point, which is the mouse cursor or the editor. By default, the anchor point is specified with the ToolTipController.ToolTipAnchor global setting. The ToolTipAnchor property allows you to override the global setting for the current editor.

If the ToolTipAnchor property is set to Cursor, tooltips are anchored relative to the mouse cursor. In this mode, a tooltip might overlap the current editor (for instance, when a large tooltip is displayed close to a screen edge). In the figure below, the tooltip for the RatingControl is anchored at the bottom right relative to the mouse cursor.

BaseEdit_ToolTipAnchor_Cursor

If the ToolTipAnchor property is set to Object, tooltips are anchored relative to the editor. In this mode, tooltips never overlap the current editor, no matter how big they are. In the following figure, the tooltip is anchored at the bottom right relative to the editor.

BaseEdit_ToolTipAnchor_Object

You can also dynamically anchor tooltips, while handling the ToolTipController.BeforeShow event, and specifying the ToolTipControllerShowEventArgs.ToolTipAnchor event argument.

See Also