Application.DockItem

From Xojo Documentation

Property (As DockItem )


aApplication.DockItem = newDockItemValue
or
DockItemValue = aApplication.DockItem

Supported for all project types and targets.

Enables you to manipulate the dock item associated with the application (macOS only).

Notes

The DockItem property enables you to access the properties and methods of the DockItem class. This class has two methods, UpdateNow and ResetIcon, and one property, Graphics. Use the methods of the Graphics class to modify the appearance of the icon. Since a macOS icon is intended to be scaled automatically, you should design it as a 512x512 pixel icon.

  • ResetIcon resets the icon to its original state (default appearance).
  • Call the UpdateNow method to redraw the icon.

You can also use the ClearRect property of the Graphics class to start over from a blank icon. Anything you can do with a Graphics object you are able to do with the Dock's Graphics object (like drawing in a picture or using a Group2D). The DockItem property of the Window class enables you to control the dock item for individual windows.