FontPanel

Overview

Creates a new system Font Panel that the user can select a font with.

Ancestors

  1. None
 

Descendants

  1. None
 

See Also

  1. None

Constructors

new FontPanel
Description

Creates a new font panel window that is initially hidden.

Definition

new FontPanel()

Members

multiple
Description

Gets or sets whether multiple fonts can be selected.

Definition

Font fontpanel.multiple (default false)
selected
Description

Gets or sets the selected font.

Definition

Font fontpanel.selected
visible
Description

Gets or sets whether the color panel is visible or hidden.

Definition

boolean fontpanel.visible

Methods

addEventListener(eventName, callback)
Description

Adds an event listener for various control level events. The first parameter is the name of the event, the second parameter is the function to call when the event happens (e.g., a callback).

Definition

fontpanel.addEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the event to start listening to.
callback function The function that will be called when it occurs.
removeEventListener(eventName, callback)
Description

Removes an event listener for various application level events. The first parameter is the name of the event, the second parameter is the function that was originally given as the callback for addEventListener.

Definition

fontpanel.removeEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the event to stop listening to.
callback function The function that would have been called.

Events

fontchange
Description

Fires when the user selects a new font from the font panel.

Definition

fontpanel.addEventListener('fontchange', function() { ... });