Reputation: 1587
Using: Delphi XE2 Update 4.1
On the form, TImageList with 12x12 images is linked to TActionManager. When selecting the 'Action' property of a TBitBtn on the form, it shows 'Invalid image size' error.
Screenshot attached:
Is there limitation on the Glyph sizes that can be attached to BitBtn? If so, its not mentioned in the Help documentation.
Upvotes: 1
Views: 1123
Reputation: 597941
The error message means a TGraphic
image was passed to the TImageList
but the graphic's Height
was less than the TImageList.Height
, or the graphic's Width
was less than the TImageList.Width
. There are four conditions where a TGraphic
is validated by TImageList
:
TCustomImageList.GetImageHandle()
, which is called by TCustomImageList.Add()
, TCustomImageList.AddMasked()
, and TCustomImageList.Replace()
TCustomImageList.AddIcon()
TCustomImageList.ReplaceMasked()
TCustomImageList.ReplaceIcon()
In your case, AddIcon()
is being called, so clearly the dimensions of the icon being added to the TImageList
are too small.
Upvotes: 1