Control.AccessibilityNotifyClients メソッド

定義

アクセシビリティ クライアント アプリケーションに AccessibleEventsを通知します。

オーバーロード

名前 説明
AccessibilityNotifyClients(AccessibleEvents, Int32)

指定した子コントロールの指定した AccessibleEvents をアクセシビリティ クライアント アプリケーションに通知します。

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

指定した子コントロールの指定した AccessibleEvents をアクセシビリティ クライアント アプリケーションに通知します。

AccessibilityNotifyClients(AccessibleEvents, Int32)

指定した子コントロールの指定した AccessibleEvents をアクセシビリティ クライアント アプリケーションに通知します。

protected:
 void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int childID);
protected public:
 void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int childID);
protected void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int childID);
protected internal void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int childID);
member this.AccessibilityNotifyClients : System.Windows.Forms.AccessibleEvents * int -> unit
Protected Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, childID As Integer)
Protected Friend Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, childID As Integer)

パラメーター

accEvent
AccessibleEvents

アクセシビリティ クライアント アプリケーションに通知する AccessibleEvents

childID
Int32

Control アクセス可能なイベントを通知します。

次のコード例では、 AccessibleObject クラスと Control.ControlAccessibleObject クラスを使用してアクセシビリティ対応のグラフ コントロールを作成し、アクセシビリティ対応の情報を公開する方法を示します。 コントロールは、凡例と共に 2 つの曲線をプロットします。 ChartControlAccessibleObjectから派生した ControlAccessibleObject クラスは、グラフ コントロールのカスタム アクセス可能な情報を提供するために、CreateAccessibilityInstance メソッドで使用されます。 グラフの凡例は実際の Control -based コントロールではないため、代わりにグラフ コントロールによって描画されるため、組み込みのアクセス可能な情報は表示されません。 このため、 ChartControlAccessibleObject クラスは GetChild メソッドをオーバーライドして、凡例の各部分のアクセス可能な情報を表す CurveLegendAccessibleObject を返します。 アクセシビリティ対応アプリケーションがこのコントロールを使用する場合、コントロールは必要なアクセシビリティ対応の情報を提供できます。

このコードの抜粋は、 AccessibilityNotifyClients メソッドの呼び出しを示しています。 完全なコード例については、 AccessibleObject クラスの概要を参照してください。

   // Gets or sets the location for the curve legend.
   Point get()
   {
      return location;
   }

   void set( Point value )
   {
      location = value;
      chart->Invalidate();
      
      // Notifies the chart of the location change. This is used for
      // the accessibility information. AccessibleEvents::LocationChange
      // tells the chart the reason for the notification.
      chart->AccessibilityNotifyClients( AccessibleEvents::LocationChange, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
   }

}

property String^ Name 
{

   // Gets or sets the Name for the curve legend.
   String^ get()
   {
      return name;
   }

   void set( String^ value )
   {
      if ( name != value )
      {
         name = value;
         chart->Invalidate();
         
         // Notifies the chart of the name change. This is used for
         // the accessibility information. AccessibleEvents::NameChange
         // tells the chart the reason for the notification.
         chart->AccessibilityNotifyClients( AccessibleEvents::NameChange, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
      }
   }

}

property bool Selected 
{

   // Gets or sets the Selected state for the curve legend.
   bool get()
   {
      return selected;
   }

   void set( bool value )
   {
      if ( selected != value )
      {
         selected = value;
         chart->Invalidate();
         
         // Notifies the chart of the selection value change. This is used for
         // the accessibility information. The AccessibleEvents value depends upon
         // if the selection is true (AccessibleEvents::SelectionAdd) or
         // false (AccessibleEvents::SelectionRemove).
         chart->AccessibilityNotifyClients( selected ? AccessibleEvents::SelectionAdd : AccessibleEvents::SelectionRemove, (dynamic_cast<CurveLegendAccessibleObject^>(AccessibilityObject))->ID );
      }
   }
    // Gets or sets the location for the curve legend.
    public Point Location
    {   
        get {
            return location;
        }
        set {
            location = value;
            chart.Invalidate();

            // Notifies the chart of the location change. This is used for
            // the accessibility information. AccessibleEvents.LocationChange
            // tells the chart the reason for the notification.

            chart.AccessibilityNotifyClients(AccessibleEvents.LocationChange, 
                ((CurveLegendAccessibleObject)AccessibilityObject).ID);
        }
    }            

    // Gets or sets the Name for the curve legend.
    public string Name
    {   
        get {
            return name;
        }
        set {
            if (name != value) 
            {
                name = value;
                chart.Invalidate();

                // Notifies the chart of the name change. This is used for
                // the accessibility information. AccessibleEvents.NameChange
                // tells the chart the reason for the notification.

                chart.AccessibilityNotifyClients(AccessibleEvents.NameChange, 
                    ((CurveLegendAccessibleObject)AccessibilityObject).ID);
            }
        }
    }

    // Gets or sets the Selected state for the curve legend.
    public bool Selected
    {   
        get {
            return selected;
        }
        set {
            if (selected != value) 
            {
                selected = value;
                chart.Invalidate();

                // Notifies the chart of the selection value change. This is used for
                // the accessibility information. The AccessibleEvents value depends upon
                // if the selection is true (AccessibleEvents.SelectionAdd) or 
                // false (AccessibleEvents.SelectionRemove).
                chart.AccessibilityNotifyClients(
                    selected ? AccessibleEvents.SelectionAdd : AccessibleEvents.SelectionRemove, 
                    ((CurveLegendAccessibleObject)AccessibilityObject).ID);
            }
        }
    }
' Gets or sets the location for the curve legend.            
Public Property Location() As Point
    Get
        Return m_location
    End Get
    Set
        m_location = value
        chart.Invalidate()

        ' Notifies the chart of the location change. This is used for
        ' the accessibility information. AccessibleEvents.LocationChange
        ' tells the chart the reason for the notification.
        chart.ExposeAccessibilityNotifyClients(AccessibleEvents.LocationChange, _
                CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
    End Set
End Property

' Gets or sets the Name for the curve legend.            
Public Property Name() As String
    Get
        Return m_name
    End Get
    Set
        If m_name <> value Then
            m_name = value
            chart.Invalidate()

            ' Notifies the chart of the name change. This is used for
            ' the accessibility information. AccessibleEvents.NameChange
            ' tells the chart the reason for the notification. 
            chart.ExposeAccessibilityNotifyClients(AccessibleEvents.NameChange, _
                    CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
        End If
    End Set
End Property

' Gets or sets the Selected state for the curve legend.            
Public Property Selected() As Boolean
    Get
        Return m_selected
    End Get
    Set
        If m_selected <> value Then
            m_selected = value
            chart.Invalidate()

            ' Notifies the chart of the selection value change. This is used for
            ' the accessibility information. The AccessibleEvents value varies
            ' on whether the selection is true (AccessibleEvents.SelectionAdd) or 
            ' false (AccessibleEvents.SelectionRemove). 
            If m_selected Then
                chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionAdd, _
                        CType(AccessibilityObject, CurveLegendAccessibleObject).ID) 
            Else
                chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionRemove, _
                        CType(AccessibilityObject, CurveLegendAccessibleObject).ID) 
            End If
        End If
    End Set
End Property

注釈

アクセシビリティ クライアント アプリケーションに通知するAccessibleEventsごとに、Control.ControlAccessibleObject.NotifyClients メソッドを呼び出す必要があります。 NotifyClients メソッドは、通常、プロパティが設定されたとき、またはイベント ハンドラー内から呼び出されます。 たとえば、NotifyClients メソッドを呼び出し、Control.VisibleChanged イベントのイベント ハンドラー内からHideAccessibleEvents値を渡すことができます。

こちらもご覧ください

適用対象

AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

指定した子コントロールの指定した AccessibleEvents をアクセシビリティ クライアント アプリケーションに通知します。

protected:
 void AccessibilityNotifyClients(System::Windows::Forms::AccessibleEvents accEvent, int objectID, int childID);
protected void AccessibilityNotifyClients(System.Windows.Forms.AccessibleEvents accEvent, int objectID, int childID);
member this.AccessibilityNotifyClients : System.Windows.Forms.AccessibleEvents * int * int -> unit
Protected Sub AccessibilityNotifyClients (accEvent As AccessibleEvents, objectID As Integer, childID As Integer)

パラメーター

accEvent
AccessibleEvents

アクセシビリティ クライアント アプリケーションに通知する AccessibleEvents

objectID
Int32

AccessibleObjectの識別子。

childID
Int32

Control アクセス可能なイベントを通知します。

適用対象