AccessibleStates Enumeración

Definición

Especifica valores que representan posibles estados de un objeto accesible.Specifies values representing possible states for an accessible object.

Esta enumeración tiene el atributo FlagsAttribute, que permite una combinación bit a bit de sus valores de miembro.

public enum class AccessibleStates
[System.Flags]
public enum AccessibleStates
type AccessibleStates = 
Public Enum AccessibleStates
Herencia
AccessibleStates
Atributos

Campos

AlertHigh 268435456

Información importante que se debe transmitir al usuario de forma inmediata.The important information that should be conveyed to the user immediately. Por ejemplo, un indicador de nivel de batería que alcanza un nivel bajo crítico cambia a este estado, en cuyo caso, una utilidad de acceso oculto presenta esta información inmediatamente al usuario y un programa de ampliación de pantalla desplaza la pantalla para que el indicador de batería quede a la vista.For example, a battery-level indicator reaching a critical low level would transition to this state, in which case, a blind access utility would announce this information immediately to the user, and a screen magnification program would scroll the screen so that the battery indicator is in view. Este estado también es adecuado para cualquier solicitud u operación que se deba llevar a cabo antes de que el usuario pueda continuar.This state is also appropriate for any prompt or operation that must be completed before the user can continue.

AlertLow 67108864

Información de prioridad baja que puede no ser importante para el usuario.The low-priority information that might not be important to the user.

AlertMedium 134217728

Información importante que no es necesario transmitir al usuario de forma inmediata.The important information that does not need to be conveyed to the user immediately. Por ejemplo, cuando un indicador de nivel de batería empieza a alcanzar un nivel bajo, puede generar una alerta de nivel medio.For example, when a battery-level indicator is starting to reach a low level, it could generate a medium-level alert. A continuación, las utilidades de acceso oculto generan un sonido para hacer saber al usuario que hay información importante disponible sin interrumpir realmente su trabajo.Blind access utilities could then generate a sound to let the user know that important information is available, without actually interrupting the user's work. Así, los usuarios pueden consultar la información de alerta cuando lo deseen.Users can then query the alert information any time they choose.

Animated 16384

Objeto que cambia rápida y constantemente de apariencia.The object that rapidly or constantly changes appearance. Los gráficos que en ocasiones son animados, pero no siempre, deben definirse como GraphicORAnimated.Graphics that are occasionally animated, but not always, should be defined as GraphicORAnimated. Este estado no se debe utilizar para indicar el cambio de ubicación de un objeto.This state should not be used to indicate that the object's location is changing.

Busy 2048

Control que no puede aceptar ninguna entrada con su condición actual.A control that cannot accept input in its current condition.

Checked 16

Objeto con una casilla seleccionada.An object with a selected check box.

Collapsed 1024

Secundarios ocultos del objeto que son elementos de una estructura de árbol o esquema.The hidden children of the object that are items in an outline or tree structure.

Default 256

Botón o elemento de menú predeterminado.The default button or menu item.

Expanded 512

Secundarios mostrados del objeto que son elementos de una estructura de árbol o esquema.The displayed children of the object that are items in an outline or tree structure.

ExtSelectable 33554432

Selección modificada, de tal forma que todos los objetos entre el delimitador de selección, que es el objeto con el foco de teclado, y este objeto adopten el estado de selección del objeto delimitador.The altered selection such that all objects between the selection anchor, which is the object with the keyboard focus, and this object take on the anchor object's selection state. Si el objeto delimitador no está seleccionado, los objetos se quitan de la selección.If the anchor object is not selected, the objects are removed from the selection. Si el objeto delimitador está seleccionado, la selección se extiende para incluir este objeto y todos los que se encuentren entre ellos.If the anchor object is selected, the selection is extended to include this object and all objects in between. Se puede establecer el estado de selección mediante su combinación con AddSelection o RemoveSelection.You can set the selection state by combining this with AddSelection or RemoveSelection. Este estado no cambia el foco ni el delimitador de selección, a menos que se combine con TakeFocus.This state does not change the focus or the selection anchor unless it is combined with TakeFocus.

Floating 4096

Objeto que no está fijado al límite de su objeto primario y que no se mueve automáticamente junto con él.The object that is not fixed to the boundary of its parent object and that does not move automatically along with the parent.

Focusable 1048576

Objeto de la ventana activa que puede recibir el foco de teclado.The object on the active window that can receive keyboard focus.

Focused 4

Objeto con el foco de teclado.An object with the keyboard focus.

HasPopup 1073741824

Cuando se le llama, el objeto muestra una ventana o menú emergente.The object displays a pop-up menu or window when invoked.

HotTracked 128

Objeto con un seguimiento completo por parte del mouse, lo que significa que su apariencia se resalta para indicar que el puntero del mouse se encuentra sobre él.The object hot-tracked by the mouse, meaning its appearance is highlighted to indicate the mouse pointer is located over it.

Indeterminate 32

Casilla de tres estados o botón de la barra de herramientas cuyo estado es indeterminado.A three-state check box or toolbar button whose state is indeterminate. La casilla no está ni activada ni desactivada, sino que se encuentra en el tercer estado o estado combinado.The check box is neither checked nor unchecked, and it is in the third or mixed state.

Invisible 32768

Objeto sin una interfaz de usuario visible.An object without a visible user interface.

Linked 4194304

Objeto vinculado que no se ha seleccionado anteriormente.A linked object that has not been previously selected.

Marqueed 8192

Objeto con texto o gráficos que se desplazan o se mueven.An object with scrolling or moving text or graphics.

Mixed 32

Casilla de tres estados o botón de la barra de herramientas cuyo estado es indeterminado.A three-state check box or toolbar button whose state is indeterminate. La casilla no está ni activada ni desactivada, sino que se encuentra en el tercer estado o estado combinado.The check box is neither checked nor unchecked, and it is in the third or mixed state.

Moveable 262144

Objeto que se puede mover.A movable object.

MultiSelectable 16777216

Objeto que acepta la selección de varios elementos.An object that accepts multiple selected items.

None 0

Sin estado.No state.

Offscreen 65536

Sin representación en pantalla.No on-screen representation. Un objeto de alerta o sonido, o una ventana oculta que nunca se hace visible, tienen este estado.A sound or alert object would have this state, or a hidden window that is never made visible.

Pressed 8

Objeto presionado.A pressed object.

Protected 536870912

Control de edición protegido por contraseña.A password-protected edit control.

ReadOnly 64

Objeto de sólo lectura.A read-only object.

Selectable 2097152

Objeto que puede aceptar una selección.An object that can accept selection.

Selected 2

Objeto seleccionado.A selected object.

SelfVoicing 524288

El objeto o secundario pueden utilizar texto a voz (TTS) para describirse a sí mismos.The object or child can use text-to-speech (TTS) to describe itself. Una ayuda de accesibilidad basada en la voz no debe ofrecer información cuando un objeto con este estado tiene el foco, puesto que el objeto ofrece automáticamente información sobre sí mismo.A speech-based accessibility aid should not announce information when an object with this state has the focus, because the object automatically announces information about itself.

Sizeable 131072

Objeto cuyo tamaño se puede cambiar.A sizable object.

Traversed 8388608

Objeto vinculado que se ha seleccionado anteriormente.A linked object that has previously been selected.

Unavailable 1

Objeto no disponible.An unavailable object.

Valid 1073741823

Objeto válido.A valid object. Esta propiedad está desusada en .NET Framework 2.0.NET Framework 2.0.This property is deprecated in .NET Framework 2.0.NET Framework 2.0.

Ejemplos

En el ejemplo de código siguiente se muestra la creación de un control de gráfico con reconocimiento de accesibilidad mediante las clases AccessibleObject y Control.ControlAccessibleObject para exponer información accesible.The following code example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. El control traza dos curvas junto con una leyenda.The control plots two curves along with a legend. La clase ChartControlAccessibleObject, que se deriva de ControlAccessibleObject, se usa en el método CreateAccessibilityInstance para proporcionar información de acceso personalizado para el control Chart.The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Dado que la leyenda del gráfico no es un control real basado en Control, sino que se dibuja mediante el control Chart, no contiene ninguna información accesible integrada.Because the chart legend is not an actual control based on Control, but instead is drawn by the chart control, it does not contain any built-in accessible information. Por este motivo, la clase ChartControlAccessibleObject invalida el método GetChild para devolver el CurveLegendAccessibleObject que representa información accesible para cada parte de la leyenda.Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. Cuando una aplicación compatible con acceso utiliza este control, el control puede proporcionar la información accesible necesaria.When an accessible-aware application uses this control, the control can provide the necessary accessible information.

En este fragmento de código se muestra cómo usar la enumeración AccessibleStates con la propiedad State.This code excerpt demonstrates using the AccessibleStates enumeration with the State property. Vea la información general de la clase AccessibleObject para obtener el ejemplo de código completo.See the AccessibleObject class overview for the complete code example.

// Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
// The ChartControlAccessibleObject is returned in the ChartControl::CreateAccessibilityInstance .
ref class ChartControlAccessibleObject: public ControlAccessibleObject
{
private:
   ChartControl^ chartControl;

public:
   ChartControlAccessibleObject( ChartControl^ ctrl )
      : ControlAccessibleObject( ctrl )
   {
      chartControl = ctrl;
   }


   property System::Windows::Forms::AccessibleRole Role 
   {

      // Gets the role for the Chart. This is used by accessibility programs.
      virtual System::Windows::Forms::AccessibleRole get() override
      {
         return ::AccessibleRole::Chart;
      }

   }

   property AccessibleStates State 
   {

      // Gets the state for the Chart. This is used by accessibility programs.
      virtual AccessibleStates get() override
      {
         return AccessibleStates::ReadOnly;
      }

   }

   // The CurveLegend objects are "child" controls in terms of accessibility so
   // return the number of ChartLengend objects.
   virtual int GetChildCount() override
   {
      return chartControl->Legends->Length;
   }


   // Gets the Accessibility object of the child CurveLegend idetified by index.
   virtual AccessibleObject^ GetChild( int index ) override
   {
      if ( index >= 0 && index < chartControl->Legends->Length )
      {
         return chartControl->Legends[ index ]->AccessibilityObject;
      }

      return nullptr;
   }


internal:

   // Helper function that is used by the CurveLegend's accessibility object
   // to navigate between sibiling controls. Specifically, this function is used in
   // the CurveLegend::CurveLegendAccessibleObject.Navigate function.
   AccessibleObject^ NavigateFromChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleNavigation navdir )
   {
      switch ( navdir )
      {
         case AccessibleNavigation::Down:
         case AccessibleNavigation::Next:
            return GetChild( child->ID + 1 );

         case AccessibleNavigation::Up:
         case AccessibleNavigation::Previous:
            return GetChild( child->ID - 1 );
      }
      return nullptr;
   }


   // Helper function that is used by the CurveLegend's accessibility object
   // to select a specific CurveLegend control. Specifically, this function is used
   // in the CurveLegend::CurveLegendAccessibleObject.Select function.
   void SelectChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleSelection selection )
   {
      int childID = child->ID;
      
      // Determine which selection action should occur, based on the
      // AccessibleSelection value.
      if ( (selection & AccessibleSelection::TakeSelection) != (AccessibleSelection)0 )
      {
         for ( int i = 0; i < chartControl->Legends->Length; i++ )
         {
            if ( i == childID )
            {
               chartControl->Legends[ i ]->Selected = true;
            }
            else
            {
               chartControl->Legends[ i ]->Selected = false;
            }

         }
         
         // AccessibleSelection->AddSelection means that the CurveLegend will be selected.
         if ( (selection & AccessibleSelection::AddSelection) != (AccessibleSelection)0 )
         {
            chartControl->Legends[ childID ]->Selected = true;
         }
         
         // AccessibleSelection->AddSelection means that the CurveLegend will be unselected.
         if ( (selection & AccessibleSelection::RemoveSelection) != (AccessibleSelection)0 )
         {
            chartControl->Legends[ childID ]->Selected = false;
         }
      }
   }

};

// class ChartControlAccessibleObject
// Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
// The ChartControlAccessibleObject is returned in the ChartControl.CreateAccessibilityInstance override.
public class ChartControlAccessibleObject : ControlAccessibleObject
{
    ChartControl chartControl;

    public ChartControlAccessibleObject(ChartControl ctrl) : base(ctrl) 
    {
        chartControl = ctrl;
    }

    // Gets the role for the Chart. This is used by accessibility programs.
    public override AccessibleRole Role
    {  
        get {
            return AccessibleRole.Chart;
        }
    }

    // Gets the state for the Chart. This is used by accessibility programs.
    public override AccessibleStates State
    {  
        get {                    
            return AccessibleStates.ReadOnly;
        }
    }

    // The CurveLegend objects are "child" controls in terms of accessibility so 
    // return the number of ChartLengend objects.
    public override int GetChildCount()
    {  
        return chartControl.Legends.Length;
    }

    // Gets the Accessibility object of the child CurveLegend idetified by index.
    public override AccessibleObject GetChild(int index)
    {  
        if (index >= 0 && index < chartControl.Legends.Length) {
            return chartControl.Legends[index].AccessibilityObject;
        }                
        return null;
    }

    // Helper function that is used by the CurveLegend's accessibility object
    // to navigate between sibiling controls. Specifically, this function is used in
    // the CurveLegend.CurveLegendAccessibleObject.Navigate function.
    internal AccessibleObject NavigateFromChild(CurveLegend.CurveLegendAccessibleObject child, 
                                                AccessibleNavigation navdir) 
    {  
        switch(navdir) {
            case AccessibleNavigation.Down:
            case AccessibleNavigation.Next:
                return GetChild(child.ID + 1);
                
            case AccessibleNavigation.Up:
            case AccessibleNavigation.Previous:
                return GetChild(child.ID - 1);                        
        }
        return null;
    }

    // Helper function that is used by the CurveLegend's accessibility object
    // to select a specific CurveLegend control. Specifically, this function is used
    // in the CurveLegend.CurveLegendAccessibleObject.Select function.
    internal void SelectChild(CurveLegend.CurveLegendAccessibleObject child, AccessibleSelection selection) 
    {   
        int childID = child.ID;

        // Determine which selection action should occur, based on the
        // AccessibleSelection value.
        if ((selection & AccessibleSelection.TakeSelection) != 0) {
            for(int i = 0; i < chartControl.Legends.Length; i++) {
                if (i == childID) {
                    chartControl.Legends[i].Selected = true;                        
                } else {
                    chartControl.Legends[i].Selected = false;
                }
            }

            // AccessibleSelection.AddSelection means that the CurveLegend will be selected.
            if ((selection & AccessibleSelection.AddSelection) != 0) {
                chartControl.Legends[childID].Selected = true;                        
            }

            // AccessibleSelection.AddSelection means that the CurveLegend will be unselected.
            if ((selection & AccessibleSelection.RemoveSelection) != 0) {
                chartControl.Legends[childID].Selected = false;                        
            }
        }            
    }
}
' Inner Class ChartControlAccessibleObject represents accessible information 
' associated with the ChartControl.
' The ChartControlAccessibleObject is returned in the         ' ChartControl.CreateAccessibilityInstance override.
Public Class ChartControlAccessibleObject
    Inherits Control.ControlAccessibleObject

    Private chartControl As ChartControl
    
    Public Sub New(ctrl As ChartControl)
        MyBase.New(ctrl)
        chartControl = ctrl
    End Sub
    
    ' Get the role for the Chart. This is used by accessibility programs.            
    Public Overrides ReadOnly Property Role() As AccessibleRole
        Get
            Return System.Windows.Forms.AccessibleRole.Chart
        End Get
    End Property
    
    ' Get the state for the Chart. This is used by accessibility programs.            
    Public Overrides ReadOnly Property State() As AccessibleStates
        Get
            Return AccessibleStates.ReadOnly
        End Get
    End Property                        
    
    ' The CurveLegend objects are "child" controls in terms of accessibility so 
    ' return the number of ChartLengend objects.            
    Public Overrides Function GetChildCount() As Integer
        Return chartControl.Legends.Length
    End Function 
    
    ' Get the Accessibility object of the child CurveLegend idetified by index.
    Public Overrides Function GetChild(index As Integer) As AccessibleObject
        If index >= 0 And index < chartControl.Legends.Length Then
            Return chartControl.Legends(index).AccessibilityObject
        End If
        Return Nothing
    End Function 
    
    ' Helper function that is used by the CurveLegend's accessibility object
    ' to navigate between sibiling controls. Specifically, this function is used in
    ' the CurveLegend.CurveLegendAccessibleObject.Navigate function.
    Friend Function NavigateFromChild(child As CurveLegend.CurveLegendAccessibleObject, _
                                    navdir As AccessibleNavigation) As AccessibleObject
        Select Case navdir
            Case AccessibleNavigation.Down, AccessibleNavigation.Next
                    Return GetChild(child.ID + 1)
            
            Case AccessibleNavigation.Up, AccessibleNavigation.Previous
                    Return GetChild(child.ID - 1)
        End Select
        Return Nothing
    End Function            

    ' Helper function that is used by the CurveLegend's accessibility object
    ' to select a specific CurveLegend control. Specifically, this function is used 
    ' in the CurveLegend.CurveLegendAccessibleObject.Select function.            
    Friend Sub SelectChild(child As CurveLegend.CurveLegendAccessibleObject, selection As AccessibleSelection)
        Dim childID As Integer = child.ID
        
        ' Determine which selection action should occur, based on the
        ' AccessibleSelection value.
        If (selection And AccessibleSelection.TakeSelection) <> 0 Then
            Dim i As Integer
            For i = 0 To chartControl.Legends.Length - 1
                If i = childID Then
                    chartControl.Legends(i).Selected = True
                Else
                    chartControl.Legends(i).Selected = False
                End If
            Next i
            
            ' AccessibleSelection.AddSelection means that the CurveLegend will be selected.
            If (selection And AccessibleSelection.AddSelection) <> 0 Then
                chartControl.Legends(childID).Selected = True
            End If

            ' AccessibleSelection.AddSelection means that the CurveLegend will be unselected.                    
            If (selection And AccessibleSelection.RemoveSelection) <> 0 Then
                chartControl.Legends(childID).Selected = False
            End If
        End If
    End Sub
End Class

Comentarios

Un objeto accesible puede asociarse a uno o varios de estos Estados.An accessible object can be associated with one or more of these states.

Para obtener más información acerca de la aplicación de accesibilidad, vea "Microsoft Active Accessibility" en la biblioteca de Microsoft Developer Network (MSDN) en https://msdn.microsoft.com/library.For more information about the accessibility application, see "Microsoft Active Accessibility" in the Microsoft Developer Network (MSDN) library at https://msdn.microsoft.com/library.

Se aplica a

Consulte también: