Control.CanSelect 속성

정의

컨트롤을 선택할 수 있는지를 나타내는 값을 가져옵니다.

public:
 property bool CanSelect { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool CanSelect { get; }
[<System.ComponentModel.Browsable(false)>]
member this.CanSelect : bool
Public ReadOnly Property CanSelect As Boolean

속성 값

Boolean

컨트롤을 선택할 수 있으면 true이고, 그렇지 않으면 false입니다.

특성

예제

다음 코드 예제에서는 선택한 경우 지정된 Control된 선택 합니다.

public:
   void ControlSelect( Control^ control )
   {
      
      // Select the control, if it can be selected.
      if ( control->CanSelect )
      {
         control->Select(  );
      }
   }
public void ControlSelect(Control control)
{
   // Select the control, if it can be selected.
   if(control.CanSelect)
   {
      control.Select();
   }
}
Public Sub ControlSelect(control As Control)
   ' Select the control, if it can be selected.
   If control.CanSelect Then
      control.Select()
   End If
End Sub

설명

이 속성은 값 System.Windows.Forms.ControlStylesSelectable 다른 컨트롤에 true포함되고 컨트롤 자체가 표시되고 사용하도록 설정되고 모든 부모 컨트롤이 표시되고 활성화된 경우 반환 true 됩니다.

다음 목록의 Windows Forms 컨트롤을 선택할 수 없으며 속성의 false CanSelect 값을 반환합니다. 이러한 컨트롤에서 파생된 컨트롤도 선택할 수 없습니다.

적용 대상

추가 정보