DataGrid.GetCurrentCellBounds 메서드

정의

선택된 셀의 네 모퉁이를 지정하는 Rectangle을 가져옵니다.

public:
 System::Drawing::Rectangle GetCurrentCellBounds();
public System.Drawing.Rectangle GetCurrentCellBounds ();
member this.GetCurrentCellBounds : unit -> System.Drawing.Rectangle
Public Function GetCurrentCellBounds () As Rectangle

반환

Rectangle

현재 셀의 모퉁이를 정의하는 Rectangle입니다.

예제

다음 코드 예제에서는 선택한 셀을 가져옵니다 Rectangle .

private:
   void dataGrid1_CurrentCellChange( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      Rectangle rect;
      rect = dataGrid1->GetCurrentCellBounds();
      Console::WriteLine( rect );
   }
private void dataGrid1_CurrentCellChange(object sender, EventArgs e)
 {
    Rectangle rect;
    rect = dataGrid1.GetCurrentCellBounds();
    Console.WriteLine(rect.ToString());
 }
Private Sub DataGrid1_CurrentCellChange(ByVal sender As Object, ByVal e As EventArgs)
    Dim rect As Rectangle
    rect = DataGrid1.GetCurrentCellBounds()
    Console.WriteLine(rect.ToString)
 End Sub

설명

현재 셀 이외의 셀에 대한 셀 범위를 검색하려면 .을 사용합니다 GetCellBounds.

적용 대상

추가 정보