AccessibleObject.IAccessible.accSelect(Int32, Object) Method


修改选择内容或移动辅助性对象的键盘焦点。Modifies the selection or moves the keyboard focus of the accessible object. 有关此成员的说明,请参见 accSelect(Int32, Object)For a description of this member, see accSelect(Int32, Object).

 virtual void Accessibility.IAccessible.accSelect(int flagsSelect, System::Object ^ childID) = Accessibility::IAccessible::accSelect;
void IAccessible.accSelect (int flagsSelect, object childID);
abstract member Accessibility.IAccessible.accSelect : int * obj -> unit
override this.Accessibility.IAccessible.accSelect : int * obj -> unit
Sub accSelect (flagsSelect As Integer, childID As Object) Implements IAccessible.accSelect



AccessibleSelection 值的按位组合。A bitwise combination of the AccessibleSelection values.


要对其更改选择操作的辅助性对象的 ID 号。The ID number of the accessible object on which to change the selection. 该参数为 0,则选择该对象;或者,如果该参数为子级 ID,则选择该对象的一个子对象。This parameter is 0 to select the object, or a child ID to select one of the object's child objects.



下面描述了在调用 Select 执行复杂选择操作时要指定哪些 AccessibleSelection 值。The following describes which AccessibleSelection values to specify when calling Select to perform complex selection operations.

操作Operation 标志组合Flag Combination
模拟单击To simulate a click TakeFocusTakeSelectionTakeFocus OR TakeSelection
通过模拟 CTRL + 单击来选择目标项To select a target item by simulating CTRL+click TakeFocusAddSelectionTakeFocus OR AddSelection
通过模拟 CTRL + 单击取消选择目标项To cancel selection of a target item by simulating CTRL+click TakeFocusRemoveSelectionTakeFocus OR RemoveSelection
模拟 SHIFT + 单击To simulate SHIFT+click TakeFocusExtendSelectionTakeFocus OR ExtendSelection
选择对象范围并将焦点放在最后一个对象上To select a range of objects and put focus on the last object 在起始对象上指定 TakeFocus 以设置选择定位点。Specify TakeFocus on the starting object to set the selection anchor. 然后再次调用 Select,并在最后一个对象上指定 TakeFocusExtendSelectionThen call Select again and specify TakeFocus OR ExtendSelection on the last object.
取消选择所有对象To deselect all objects 对任何对象指定 TakeSelectionSpecify TakeSelection on any object. 此标志取消选择除了刚选择的对象之外的所有选择的对象。This flag deselects all selected objects except the one just selected. 然后再次调用 Select,并在同一对象上指定 RemoveSelectionThen call Select again and specify RemoveSelection on the same object.

此成员是显式接口成员实现。This member is an explicit interface member implementation. 它只能在 AccessibleObject 实例被强制转换为 IAccessible 接口时使用。It can be used only when the AccessibleObject instance is cast to an IAccessible interface.

Applies to