Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,095
    • Issues 2,095
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #32516
Closed
Open
Created Oct 06, 2017 by FPC Admin account@fpc_adminOwner

Menu Caption not updated at runtime when Popup Menu associated with TrayIcon

Original Reporter info from Mantis: dbannon @davidbannon
  • Reporter name: David

Description:

When a Popup Menu is attached to the TrayIcon, updating the MemuItem's caption at run time does not change what is displayed. It does change, it can be read by the program but the user does not see the change when they click the TrayIcon.

Steps to reproduce:

Blank form, add a popup memu, TrayIcon and two buttons. Associate the PopupMenu with the Tray Icon, create a one or more menu items and make one button show the TrayIcon.

Then, make the other button change the memu item's caption -

MenuItem1.Caption := 'I changed this';

Run it, click first button to display TrayIcon, click the second button, then the trayicon to see its menu. On OSX, Carbon, its won't have changed.

Additional information:

Works fine on Linux, windows and even OSX-Cocoa (wow!).

It does work if you call TrayIcon.InternalUpdate; after updating the caption. Its an easy workaround but thats all. (Credit to Hansaplast)

Mantis conversion info:

  • Mantis ID: 32516
  • OS: OSX
  • OS Build: Sierra
  • Platform: Mac
  • Version: 1.8RC4
  • Monitored by: » @davidbannon (David)
Assignee
Assign to
Time tracking