首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Delphi -TBitBtn无效图像大小错误

Delphi -TBitBtn无效图像大小错误
EN

Stack Overflow用户
提问于 2014-10-06 15:22:55
回答 1查看 950关注 0票数 1

使用: Delphi XE2更新4.1

在表单中,具有12x12图像的TImageList链接到TActionManager。在窗体上选择TBitBtn的“Action”属性时,会显示“无效图像大小”错误。

随附截图:

可以附加到BitBtn上的字形大小有限制吗?如果是的话,帮助文档中就没有提到它。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-10-10 20:14:25

错误消息意味着将TGraphic图像传递给TImageList,但是图形的Height小于TImageList.Height,或者图形的Width小于TImageList.WidthTGraphicTImageList验证的条件有四种

  1. TCustomImageList.GetImageHandle(),由TCustomImageList.Add()TCustomImageList.AddMasked()TCustomImageList.Replace()调用。
  2. TCustomImageList.AddIcon()
  3. TCustomImageList.ReplaceMasked()
  4. TCustomImageList.ReplaceIcon()

在您的例子中,AddIcon()正在被调用,所以很明显,添加到TImageList中的图标的尺寸太小了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26219482

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档