Unit 'ExtCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TTrayIcon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a multi-platform system tray component.

Declaration

Source position: extctrls.pp line 1417

type TTrayIcon = class(TCustomTrayIcon)

published

  property BalloonFlags: TBalloonFlags;

  

Defines the balloon flag displayed for the tray icon balloon hint.

  property BalloonHint: string;

  

The text displayed in the balloon hint window.

  property BalloonTimeout: Integer;

  

The interval after which the balloon hint disappears.

  property BalloonTitle: string;

  

Title used for the balloon hint window.

  property PopUpMenu: TPopupMenu;

  

Pop-up menu displayed when right mouse button is clicked over the icon for the control.

  property Icon: TIcon;

  

The Icon or picture that displayed on the tray icon.

  property Hint: string;

  

Hint text displayed when the mouse is hovered over the tray icon.

  property Visible: Boolean;

  

Indicates if the tray icon is displayed in the system tray.

  property OnClick: TNotifyEvent;

  

Event handler signalled when a mouse button is single-clicked on the tray icon.

  property OnDblClick: TNotifyEvent;

  

Event handler signalled when a mouse button is double-clicked on the tray icon.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse button down event is detected for the tray icon.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler signalled when a WM_MOUSEMOVE message is handled for the tray icon.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse button up event is detected for the tray icon.

  property OnPaint: TNotifyEvent;

  

Event handler signalled to implement custom drawing for the tray icon.

end;

Inheritance

TTrayIcon

  

Implements a multi-platform system tray component.

|

TCustomTrayIcon

  

Defines the base class for a multi-platform system tray icon component.

|

TLCLComponent

  

|

TObject

Description

TTrayIcon is a TCustomTrayIcon descendant which implements a multi-platform System Tray component. It allows an icon to be displayed in the system tray when the Application or Form is active. TTrayIcon provides properties, methods, and events used to configure, display, and control the tray icon. It sets the visibility for properties from ancestor classes. The component is supported on multiple platforms, but its implementation is platform-specific.

On the Windows platform, the system tray is usually located on the bottom-right corner of the screen, but it can be located on other edges for the physical screen. For other platforms, the position and other features varies according to the window or display manager in use.

Use Icon to set the icon image type displayed for the control. Use Icons to assign a list of images displayed as the animated icon for the control when the Show method is called.

Use BalloonFlags, BalloonHint, BalloonTimeout and BalloonTitle to format and display balloon hints for the tray icon. If balloon hints are not supported for the platform, an internal TPopupNotifier is used to display the Hint for the control.

Use PopUpMenu to set the menu displayed when the icon is right clicked with the mouse.

Assign routines to the event handlers to perform actions needed when the icon is clicked - or when mouse move, up, or down messages are received.

Remark: TCustomTrayIcon / TTrayIcon are partially compatible with the Delphi VCL component. It adds an OnPaint event handler which does not exist in Delphi. It omits properties like IconIndex and OnBalloonClick.

See also

TCustomTrayIcon

  

Defines the base class for a multi-platform system tray icon component.



CT Web help

CodeTyphon Studio