Skip to content

Display tooltips for radio group items using the WinForms ToolTipController component.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-tooltipcontroller-show-radiogroup-tooltips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms RadioGroup - Display item tooltips using ToolTipController

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;
        }
    }
}

Files to Review

Documentation

See Also

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)