This example demonstrates how to use the WinForms ToolTipController component to display hints for items in a radio group.
The example assigns the ToolTipController
to the radio group's ToolTipController property and handles the ToolTipController.GetActiveObjectInfo event to display an item's description in the tooltip:
private void toolTipController1_GetActiveObjectInfo(object sender, DevExpress.Utils.ToolTipControllerGetActiveObjectInfoEventArgs e) {
RadioGroup rg = e.SelectedControl as RadioGroup;
if (rg == null) return;
for (int i = 0; i < rGroup.Properties.Items.Count; i ) {
Rectangle rect = rGroup.GetItemRectangle(i);
if (rect.Contains(e.ControlMousePosition)) {
e.Info = new ToolTipControlInfo(i, rGroup.Properties.Items[i].Description);
break;
}
}
}
(you will be redirected to DevExpress.com to submit your response)