PDA

Ver la Versión Completa : Error cuando intento agregar una imagen en un TImageList


darkamerico
25-04-2016, 04:49:57
Saludos, resumí el error en esta captura:

Segun embarcadero aqui: http://docwiki.embarcadero.com/CodeExamples/Seattle/en/TComboBoxEx_(Delphi), este codigo deberia funcionar...

http://s31.postimg.org/hra46qy2j/error.jpg

AgustinOrtu
25-04-2016, 05:27:40
El codigo de la docwiki me compila perfectamente

Estas usando el metodo incorrecto


TCustomImageList = class
...
public
function Add(Image, Mask: TBitmap): Integer;
function AddImage(Value: TCustomImageList; Index: Integer): Integer;
end;


Debes usar el metodo Add, que recibe como parametro una Imagen (Bitmap) y la mascara

El metdo AddImage recibe TCustomImageList y obviamente es incompatible con TBitmap