Panel.BorderStyle 속성

정의

컨트롤의 테두리 스타일을 나타냅니다.

public:
 property System::Windows::Forms::BorderStyle BorderStyle { System::Windows::Forms::BorderStyle get(); void set(System::Windows::Forms::BorderStyle value); };
public System.Windows.Forms.BorderStyle BorderStyle { get; set; }
member this.BorderStyle : System.Windows.Forms.BorderStyle with get, set
Public Property BorderStyle As BorderStyle

속성 값

BorderStyle

BorderStyle 값 중 하나입니다. 기본값은 BorderStyle.None입니다.

예외

이 속성을 설정할 때 지정된 값이 유효한 BorderStyle 값이 아닙니다.

예제

다음 코드 예제에서는 3차원 테두리가 있는 컨트롤을 만듭니다 Panel .

public:
   void CreateMyPanel()
   {
      Panel^ panel1 = gcnew Panel;
      
      // Initialize the Panel control.
      panel1->Location = Point(56,72);
      panel1->Size = System::Drawing::Size( 264, 152 );
      // Set the Borderstyle for the Panel to three-dimensional.
      panel1->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
   }
public void CreateMyPanel()
{
   Panel panel1 = new Panel();
   
   // Initialize the Panel control.
   panel1.Location = new Point(56,72);
   panel1.Size = new Size(264, 152);
   // Set the Borderstyle for the Panel to three-dimensional.
   panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
}
Public Sub CreateMyPanel()
    Dim panel1 As New Panel()
       
    ' Initialize the Panel control.
    panel1.Location = New Point(56, 72)
    panel1.Size = New Size(264, 152)
    ' Set the Borderstyle for the Panel to three-dimensional.
    panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
End Sub

설명

기본적으로 컨트롤은 Panel 테두리 없이 표시됩니다. 이 속성을 사용하여 폼의 다른 영역과 컨트롤의 Panel 경계를 구분할 수 있습니다.

적용 대상