Recent

Author Topic: Trayicon with text?  (Read 4877 times)

tigersoul

  • Newbie
  • Posts: 1
Trayicon with text?
« on: December 10, 2021, 01:45:41 pm »
On macOS a tray icon can have text instead of an icon. It's very usable, looking for example like this:
https://imgur.com/a/Voi4Rxn

Can this be achieves with TTrayIcon or some version of it? It's a used technique in a project I'm trying to move to pascal.

ps: the phone icon is just an emoji, so all of the icon is just text.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1989
  • Former Delphi 1-7, 10.2 user
Re: Trayicon with text?
« Reply #1 on: December 11, 2021, 11:50:21 am »
See the Wiki article How to use a TrayIcon.

Alternatively, you could use the native NSStatusBar class.
« Last Edit: December 11, 2021, 11:52:07 am by trev »
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1989
  • Former Delphi 1-7, 10.2 user
Re: Trayicon with text?
« Reply #2 on: December 13, 2021, 01:53:47 am »
I've included an NSStatusBar example in the Wiki.
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

 

TinyPortal © 2005-2018