-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
39 lines (30 loc) · 982 Bytes
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.Utils;
using DevExpress.XtraEditors;
namespace RadioGroupControlToolTip
{
public partial class FormMain : Form
{
public FormMain()
{
InitializeComponent();
}
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;
}
}
}
}
}