使用: Delphi XE2更新4.1
在表单中,具有12x12图像的TImageList链接到TActionManager。在窗体上选择TBitBtn的“Action”属性时,会显示“无效图像大小”错误。
随附截图:

可以附加到BitBtn上的字形大小有限制吗?如果是的话,帮助文档中就没有提到它。
发布于 2014-10-10 20:14:25
错误消息意味着将TGraphic图像传递给TImageList,但是图形的Height小于TImageList.Height,或者图形的Width小于TImageList.Width。TGraphic由TImageList验证的条件有四种
TCustomImageList.GetImageHandle(),由TCustomImageList.Add()、TCustomImageList.AddMasked()和TCustomImageList.Replace()调用。TCustomImageList.AddIcon()TCustomImageList.ReplaceMasked()TCustomImageList.ReplaceIcon()在您的例子中,AddIcon()正在被调用,所以很明显,添加到TImageList中的图标的尺寸太小了。
https://stackoverflow.com/questions/26219482
复制相似问题