klyn.gui.windows.Window.icon
property
public property icon as Icon
Description

Application icon displayed by the window manager and native title bar. The Klyn-painted frame also displays it beside the window title. Assign a raster icon (PNG, BMP, GIF, JPEG or TIFF), or null to clear it. Native sizes are prepared when assigned, without file I/O on repaint. Reassign the icon after changing its filename to update the native image.

Throws
  • ValueException for vector images or invalid raster data.
  • IOException when the image cannot be decoded.
  • Exception when a native icon cannot be created.
Example

window.icon = Icon("assets/icons/application.png")