I have a TAction that is used for both a menu item and a TButton. I want the menu item to show the label, and the TButton to show only the icon. However, when an Action is assigned, Vcl automatically sets the TButton's Caption attribute, and I cannot get rid of it.
Any ideas?
On the menu item, set
ImageIndexto-1. On the button, set theCaptionto''. You must do this at runtime.This will break the association with the action for just those individual properties. The action will still be used for
Hint,OnExecute,OnUpdateetc.