Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
70 lines (57 loc) · 5.06 KB

cp.ui.StaticText.md

File metadata and controls

70 lines (57 loc) · 5.06 KB

docs » cp.ui.StaticText


Static Text Module.

API Overview

  • Functions - API calls offered directly by the extension
  • matches
  • Fields - Variables which can only be accessed from an object returned by a constructor
  • value
  • Methods - API calls which can only be made on an object returned by a constructor
  • clear
  • loadLayout
  • saveLayout
  • StaticText

API Documentation

Functions

Signature cp.ui.StaticText.matches(element) -> boolean
Type Function
Description Checks if the element is a Static Text element.
Parameters
  • element - The axuielement to check.
Returns
  • If true, the element is a Static Text element.

Fields

Signature cp.ui.StaticText.value <cp.prop: anything>
Type Field
Description The current value of the text field.

Methods

Signature cp.ui.StaticText:clear() -> self
Type Method
Description Clears the value of a Static Text box.
Parameters
  • None
Returns
  • Self
Signature cp.ui.StaticText:loadLayout(layout) -> none
Type Method
Description Loads a Static Text layout.
Parameters
  • layout - A table containing the Static Text layout settings - created using cp.ui.StaticText:saveLayout().
Returns
  • None
Signature cp.ui.StaticText:saveLayout() -> table
Type Method
Description Saves the current Static Text layout to a table.
Parameters
  • None
Returns
  • A table containing the current Static Text Layout.
Signature cp.ui.StaticText(parent, uiFinder[, convertFn]) -> StaticText
Type Method
Description Creates a new StaticText. They have a parent and a finder function.
Parameters
  • parent - The parent object.
  • uiFinder - The function will return the axuielement for the StaticText.
  • convertFn - (optional) If provided, will be passed the string value when returning.
Returns
  • The new StaticText.