DataGridView.CellToolTipTextChanged 이벤트
.NET Framework 3.0
ToolTipText 속성 값이 DataGridView의 셀에 대해 변경되면 발생합니다.
네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)
어셈블리: System.Windows.Forms(system.windows.forms.dll)
다음 코드 예제에서는 이 멤버를 사용하는 방법을 보여 줍니다. 이 예제에서 이벤트 처리기는 CellToolTipTextChanged 이벤트가 발생할 때 보고합니다. 이 보고서를 사용하면 이벤트가 발생하는 경우를 이해할 수 있으며 보다 원활하게 디버깅 작업을 수행할 수 있습니다. 자주 발생하는 이벤트 또는 여러 이벤트를 보고하려면 System.Windows.Forms.MessageBox.Show를 System.Console.WriteLine으로 바꾸거나 여러 줄로 구성된 TextBox에 메시지를 추가합니다.
예제 코드를 실행하려면 DataGridView1이라는 DataGridView 형식의 인스턴스가 있는 프로젝트에 해당 코드를 붙여넣습니다. 그런 다음 이벤트 처리기가 CellToolTipTextChanged 이벤트와 연결되어 있는지 확인합니다.
private void DataGridView1_CellToolTipTextChanged(Object sender, DataGridViewCellEventArgs e) { System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder(); messageBoxCS.AppendFormat("{0} = {1}", "ColumnIndex", e.ColumnIndex ); messageBoxCS.AppendLine(); messageBoxCS.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex ); messageBoxCS.AppendLine(); MessageBox.Show(messageBoxCS.ToString(), "CellToolTipTextChanged Event" ); }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
Microsoft .NET Framework 3.0은 Windows Vista, Microsoft Windows XP SP2 및 Windows Server 2003 SP1에서 지원됩니다.