This example shows how to handle the ToolTipController.GetActiveObjectInfo event to customize the tooltips displayed for TreeList cells:
private void toolTipController1_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) {
if(e.SelectedControl is DevExpress.XtraTreeList.TreeList) {
TreeList tree = (TreeList)e.SelectedControl;
TreeListHitInfo hit = tree.CalcHitInfo(e.ControlMousePosition);
if(hit.HitInfoType == HitInfoType.Cell) {
object cellInfo = new TreeListCellToolTipInfo(hit.Node, hit.Column, null);
string toolTip = string.Format("{0} (Column: {1}, Node ID: {2})", hit.Node[hit.Column], hit.Column.FieldName, hit.Node.Id);
e.Info = new DevExpress.Utils.ToolTipControlInfo(cellInfo, toolTip);
}
}
}
- WinForms Data Grid - How to display tooltips for grid cells if cell content is completely visible
- How to get multi-line tooltips with a specific width
- How to programmatically display a tooltip for a control via the ToolTipController component
- How to display a hint for an active editor within the XtraGrid
- How to display hints only for particular cells
(you will be redirected to DevExpress.com to submit your response)