Internationalisation
Bundled Plugins API
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

API Documentation

Functions

matches

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

value

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

Methods

clear

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.
Last modified 1mo ago