Control.AccessibleName 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
내게 필요한 옵션 지원 클라이언트 애플리케이션에서 사용하는 컨트롤의 이름을 가져오거나 설정합니다.
public:
property System::String ^ AccessibleName { System::String ^ get(); void set(System::String ^ value); };
public string AccessibleName { get; set; }
public string? AccessibleName { get; set; }
member this.AccessibleName : string with get, set
Public Property AccessibleName As String
속성 값
내게 필요한 옵션 지원 클라이언트 애플리케이션에서 사용하는 컨트롤의 이름입니다. 기본값은 null입니다.
예제
다음 코드 예제에서는 파생 클래스의 인스턴스를 CheckBox 만들고, MyCheckBox해당 Image 속성에 할당 Image 하고, 속성이 되므로 null속성 및 AccessibleDescription 속성을 Text 설정합니다AccessibleName. 이 예제에서는 Form 이름이 MyForm있어야 합니다.
public:
MyForm()
{
// Create a 'MyCheckBox' control and
// display an image on it.
MyCustomControls::MyCheckBox^ myCheckBox = gcnew MyCustomControls::MyCheckBox;
myCheckBox->Location = Point(5,5);
myCheckBox->Image = Image::FromFile( String::Concat( Application::CommonAppDataPath, "\\Preview.jpg" ) );
// Set the AccessibleName property
// since there is no Text displayed.
myCheckBox->AccessibleName = "Preview";
myCheckBox->AccessibleDescription = "A toggle button used to show the document preview.";
this->Controls->Add( myCheckBox );
}
public MyForm()
{
// Create a 'MyCheckBox' control and
// display an image on it.
MyCustomControls.MyCheckBox myCheckBox =
new MyCustomControls.MyCheckBox();
myCheckBox.Location = new Point(5,5);
myCheckBox.Image = Image.FromFile(
Application.CommonAppDataPath + "\\Preview.jpg");
// Set the AccessibleName property
// since there is no Text displayed.
myCheckBox.AccessibleName = "Preview";
myCheckBox.AccessibleDescription =
"A toggle button used to show the document preview.";
this.Controls.Add(myCheckBox);
}
Public Sub New()
' Create a 'MyCheckBox' control and
' display an image on it.
Dim myCheckBox As New MyCustomControls.MyCheckBox()
myCheckBox.Location = New Point(5, 5)
myCheckBox.Image = Image.FromFile( _
Application.CommonAppDataPath + "\Preview.jpg")
' Set the AccessibleName property
' since there is no Text displayed.
myCheckBox.AccessibleName = "Preview"
' Set the AccessibleDescription text.
myCheckBox.AccessibleDescription = _
"A toggle button used to show the document preview."
Me.Controls.Add(myCheckBox)
End Sub
설명
속성은 AccessibleName 컨테이너 내의 개체(예: Button텍스트, 이름 MenuItem또는 컨트롤 옆에 표시되는 레이블)를 간략하게 설명하고 식별하는 레이블입니다 TextBox .
액세스 가능한 개체의 속성에 대한 자세한 내용은 "설명 속성의 콘텐츠"를 참조하세요.