Show / Hide Table of Contents

Method elm.Check(+ 1 overload)


Overload

Checks or unchecks this checkbox or toggle-button, or selects this radio button. Uses elm.Invoke or elm.SendKeys.

public void Check(bool check = true, string keys = null)
Parameters
check  (bool)

true to check, false to uncheck.

keys  (string)

Keys for elm.SendKeys. If "", uses "Space". If null (default), uses elm.Invoke.

Exceptions
Exception

Exceptions of elm.Invoke or elm.SendKeys.

Remarks

Does nothing if the UI element already has the requested checked/unchecked state. Else tries to change the state and does not verify whether it actually worked.

Does not work with 3-state checkboxes and with elements that never have CHECKED state.


Overload(top)

Checks or unchecks this checkbox or toggle-button, or selects this radio button. To check/uncheck calls callback function.

public void Check(bool check, Action<elm> action)
Parameters
check  (bool)

true to check, false to uncheck.

action  (Action<elm>)

Callback function that should check or uncheck this UI element. Its parameter is this variable.

Exceptions
Exception

Exceptions of the callback function.

Remarks

Does nothing if the UI element already has the requested checked/unchecked state. Else tries to change the state and does not verify whether it actually worked.

Does not work with 3-state checkboxes and with elements that never have CHECKED state.