PropertyGrid catching mouse events
Programming/C# / 2012. 2. 1. 23:19
namespace PropertyGridP
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
private void Form5_Load(object sender, EventArgs e)
{
foreach (Control c in this.propertyGrid1.Controls)
{
c.MouseClick += new MouseEventHandler(c_MouseClick);
}
}
void c_MouseClick(object sender, MouseEventArgs e)
{
Control c = (Control)sender;
MessageBox.Show(c.GetType().FullName);
}
}
}
출처 : http://social.msdn.microsoft.com/Forums/pl-PL/winforms/thread/ec88bdab-77a0-4dc1-9885-b2407c965166
반응형
'Programming > C#' 카테고리의 다른 글
C#에서 DirectX를 활용하여 Wave파일 재생하기 (0) | 2012.03.04 |
---|---|
datagridview에 엔터키치면 오른쪽 셀 이동 (1) | 2012.02.22 |
A C# 2008 Advanced Customizable PropertyGrid Control (0) | 2012.01.26 |
Add NumericUpDown in PropertyGrid (0) | 2012.01.20 |
Nullable 형식 사용 (0) | 2012.01.19 |