TextField

Last updated 23 days ago

Text Field Module.

API Overview

API Documentation

Variables

isShowing

Signature

cp.ui.TextField.isShowing <cp.prop: boolean>

Type

Variable

Description

Is the Text Field showing?

Functions

matches

Signature

cp.ui.TextField.matches(element) -> boolean

Type

Function

Description

Checks to see if an element matches what we think it should be.

Parameters

Returns

Fields

value

Signature

cp.ui.TextField.value <cp.prop: string>

Type

Field

Description

The current value of the text field.

Methods

clear

Signature

cp.ui.TextField:clear() -> self

Type

Method

Description

Clears the value of a Text Field.

Parameters

Returns

getValue

Signature

cp.ui.TextField:getValue() -> string

Type

Method

Description

Gets the value of the Text Field.

Parameters

Returns

isEnabled

Signature

cp.ui.TextField:isEnabled() -> boolean

Type

Method

Description

Is the Text Field enabled?

Parameters

Returns

Signature

cp.ui.TextField:loadLayout(layout) -> none

Type

Method

Description

Loads a Text Field layout.

Parameters

Returns

new

Signature

cp.ui.TextField.new(parent, finderFn[, convertFn]) -> TextField

Type

Method

Description

Creates a new TextField. They have a parent and a finder function.

Parameters

Returns

parent

Signature

cp.ui.TextField:parent() -> table

Type

Method

Description

The parent object.

Parameters

Returns

Signature

cp.ui.TextField:saveLayout() -> table

Type

Method

Description

Saves the current Text Field layout to a table.

Parameters

Returns

setValue

Signature

cp.ui.TextField:setValue(value) -> self

Type

Method

Description

Sets the value of the Text Field.

Parameters

Returns

snapshot

Signature

`cp.ui.TextField:snapshot([path]) -> hs.image

nil` </span>

Type

Method

Description

Takes a snapshot of the UI in its current state as a PNG and returns it.

Parameters

UI

Signature

`cp.ui.TextField:UI() -> hs._asm.axuielement

nil` </span>

Type

Method

Description

Returns the axuielement representing the TextField, or nil if not available.

Parameters