Class: Field

Field(parentDiv, id, className)

Base GUI element container used by controllers.

Constructor

new Field(parentDiv, id, className)

Creates a new Field instance.

Parameters:
Name Type Description
parentDiv p5.Element

The parent element to attach the field to.

id string

The ID to assign to the field (optional).

className string

The CSS class to assign to the field (optional).

Source:

Methods

hide()

Hides this field by setting its display to 'none'.

Source:

isHidden() → {boolean}

Checks if this field is currently hidden.

Source:
Returns:

True if the field is hidden, false otherwise.

Type
boolean

setText(text)

Sets the text content of this field.

Parameters:
Name Type Description
text string

The new text content for the field.

Source:

setTooltip(tooltip)

Sets the tooltip text for this field.

Parameters:
Name Type Description
tooltip string

The tooltip text to set.

Source:

show()

Shows this field by setting its display to '' (default).

Source: