Modifies the selection or moves the keyboard focus of the accessible object.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
[<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>] abstract Select : flags:AccessibleSelection -> unit [<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>] override Select : flags:AccessibleSelection -> unit
Applications can use this method to perform complex selection operations.
The following describes which AccessibleSelection values to specify when calling to perform complex selection operations.
To simulate a click
This combination will not select the desired control if called from within your own application. It will have the desired effect, however, if called from an external application.
To select a target item by simulating CTRL + click
To cancel selection of a target item by simulating CTRL + click
To simulate SHIFT + click
To select a range of objects and put focus on the last object
Specify AccessibleSelection.TakeFocus on the starting object to set the selection anchor. Then call again and specify AccessibleSelection.TakeFocus OR AccessibleSelection.ExtendSelection on the last object.
To deselect all objects
Specify AccessibleSelection.TakeSelection on any object. This flag deselects all selected objects except the one just selected. Then call again and specify AccessibleSelection.RemoveSelection on the same object.
All objects that can be selected or receive the keyboard focus must support this method.
The following example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. The control plots two curves along with a legend. The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Since the chart legend is not an actual Control -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information.
This code demonstrates shows overriding the method. See the AccessibleObject class overview for the complete code example.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.