Menu Caption not updated at runtime when Popup Menu associated with TrayIcon
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
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)