I am designing a FireMonkey Component with TImageList and TImageIndex published properties. I can easily select a TImageList from the dropdown of the ImageList property, and the ImageIndex property seems to know that it should pick an image (it shows an icon next to the number), but there’s no images in the dropdown for this property (only for -1), and the icon for the (manually entered) ImageIndex value (0) is shown as a "no icon" image (the same as for -1 in the dropdown):
From the source (FMXReg.pas) it seems like I should call a line like this in my Register procedure:
RegisterPropertyEditor(TypeInfo(TImageIndex), MyControl, ”, TImageIndexProperty);
but I can’t find TImageIndexProperty anywhere.
The component works – it selects the proper image from the ImageList as defined by the ImageIndex property, even if I can’t use the drop-down box (ie. if I enter the ID number manually).
How do I implement a proper ImageIndex property editor for my FireMonkey control? How do I tell it to look up the Images in the ImageList property?
(and yes: there are images in the ImageList, which I have verified by attaching the same ImageList to a standard TButton, and here the ImageIndex dropdown works without problems).