다음을 통해 공유


DataGridTableStyle.RowHeaderWidthChanged 이벤트

정의

RowHeaderWidth 값이 변경될 때 발생합니다.

public:
 event EventHandler ^ RowHeaderWidthChanged;
public event EventHandler RowHeaderWidthChanged;
member this.RowHeaderWidthChanged : EventHandler 
Public Custom Event RowHeaderWidthChanged As EventHandler 

이벤트 유형

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.

private:
   void CallEventLoader()
   {
      this->Load += gcnew EventHandler( this, &DataGridTableStyle_RowHeaderWidth::DataGridTableStyle_RowHeaderWidth_Load );
   }

public:
   void AttachRowHeaderWidthChanged()
   {
      myDataGridTableStyle->RowHeaderWidthChanged +=
         gcnew EventHandler( this, &DataGridTableStyle_RowHeaderWidth::MyDelegateRowHeaderChanged );
   }

private:
   void MyDelegateRowHeaderChanged( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      MessageBox::Show( "Row header width is changed" );
   }

   void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      myDataGridTableStyle->RowHeaderWidth = 30;
   }

   void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      MessageBox::Show( String::Concat( "Row header width is: ", myDataGridTableStyle->RowHeaderWidth ) );
   }
private void CallEventLoader()
{
   this.Load += new EventHandler(
      this.DataGridTableStyle_RowHeaderWidth_Load);
}

public void AttachRowHeaderWidthChanged()
{
   myDataGridTableStyle.RowHeaderWidthChanged += 
                            new EventHandler(MyDelegateRowHeaderChanged);
}
private void MyDelegateRowHeaderChanged(object sender, EventArgs e)
{
   MessageBox.Show("Row header width is changed");
}

private void button1_Click(object sender, System.EventArgs e)
{  
   myDataGridTableStyle.RowHeaderWidth = 30;
}

private void button2_Click(object sender, System.EventArgs e)
{
   MessageBox.Show("Row header width is: " + 
                       myDataGridTableStyle.RowHeaderWidth);
}
Private Sub CallEventLoader()
   AddHandler Load, AddressOf DataGridTableStyle_RowHeaderWidth_Load
End Sub


Public Sub AttachRowHeaderWidthChanged()
   AddHandler myDataGridTableStyle.RowHeaderWidthChanged, AddressOf MyDelegateRowHeaderChanged
End Sub

 Private Sub MyDelegateRowHeaderChanged(ByVal sender As Object, ByVal e As EventArgs)
     MessageBox.Show("Row header width is changed")
 End Sub


Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
   myDataGridTableStyle.RowHeaderWidth = 30
End Sub


Private Sub button2_Click(sender As Object, e As EventArgs) Handles button2.Click
   MessageBox.Show("Row header width is: " & myDataGridTableStyle.RowHeaderWidth)
End Sub

설명

이벤트 처리에 대한 자세한 내용은 이벤트 처리 및 발생 을 참조하십시오.

적용 대상

추가 정보