Skip to main content

Icon (아이콘) Widget Control

This page lists the Widget Control (Property · Method · Event) you use to control the Icon widget from a script. For an introduction to the widget and how to use it, visit Icon.

info

In the examples below, iconID is the name (ID) you assigned to the Icon widget on the canvas. In a script, access members as widgetID.member.

Widget Control summary

Widget ControlKindSignatureDescription
colorPropertyiconID.colorReads and writes the icon color as an ARGB hex string.
setIconDataMethodiconID.setIconData(point, family)Changes the displayed glyph using a code point and a font family.

Property

color

Reads and writes the icon color as an ARGB hex string — for example, "#FF00AAFF".

  • Kind: Property (Read/write)
  • Type: String (ARGB hex, for example "#FF00AAFF")
  • Returns (read): the ARGB hex string (String) for the current icon color

Example

// Set the color
iconID.color = "#FF00AAFF";
// Read the current color
const current = iconID.color;

Method

setIconData

Changes the icon glyph on display using a code point and a font family.

  • Kind: Method
  • Parameters:
    • point (Number): the Unicode code point of the glyph to display (for example, 0xe016)
    • family (String): the font family that contains the glyph
  • Returns: None (void)

Example

iconID.setIconData(0xe016, "namuhx");

Event

info

Not applicable — the Icon widget has no dedicated Event.

Common Widget Control (all widgets)

note

Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).