addToSelection method

void addToSelection()

Adds the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextrange-addtoselection.

Implementation

@pragma('vm:prefer-inline')
void addToSelection() {
  final hr$ = HRESULT(_AddToSelectionFn(ptr));
  if (hr$.isError) throw WindowsException(hr$);
}