ToolTipControllerEventArgsBase.SelectedObject Property
Gets or sets the element of the control for which the tooltip should be displayed.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v24.2.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
#Declaration
#Property Value
Type | Description |
---|---|
Object | An object defining the element for which to display the tooltip. |
#Remarks
Some complex controls (such as GridControl and ButtonEdit) can display different tooltips for each control element. In this case, use the ToolTipControllerEventArgsBase.SelectedControl property to access the control and use the SelectedObject property to obtain the control’s element that invoked the tooltip.
The type of SelectedObject‘s value depends on the control’s type. For controls that do not implement the DevExpress.Utils.IToolTipControlClient interface (System.Windows.Forms.Button, for instance), SelectedObject is set to null (Nothing in Visual Basic).
If a tooltip is about to be displayed for the control (not its element) that implements the DevExpress.Utils.IToolTipControlClient interface (for instance, for any control derived from the BaseControl class), SelectedObjecthas the same value as the ToolTipControllerEventArgsBase.SelectedControl property.
If a tooltip should be displayed for an element of the control that implements the DevExpress.Utils.IToolTipControlClient interface, then SelectedObject refers to an object storing specific information. See the table below:
A tooltip is displayed for … | Selected |
---|---|
a button of a Button | a string in the form “Button |
a column header within Grid | a DevExpress. The DevExpress. |
an error icon in a cell in Grid | a DevExpress. To get the grid control and the view which contains the cell with the error icon, use the Grid and View properties respectively. The Object property refers to a DevExpress. The Cell |
an error icon for a specific row in the Grid | a DevExpress. The Object property contains the string in the form “Indicator:X” where X is the row index. The Grid and View properties refer to the grid control and the view containing the specified row. |
an error icon for a standalone editor derived from Base | a String object containing the “Error |
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedObject property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.