TImageList.draw is not drawing disabled images lazarus / 31-LCL ---------------------------------------------------------------------- daniel_sap · 2025-03-27 11:40 Hi I used to draw disabled images in Delphi with TImageList.draw But now I try it in Lazarus LCL and it's not drawing the image disabled. I created also a speed button to test what will happen with the image when it is disabled and also the speed button is not drawing it disabled. Do you have an idea what could be the issue Lazarus 4.0RC1 (rev t-fixes-4-58-g43d904ed50) FPC 3.2.2 x86_64-win64-win32/win64 This is the code where I try the speed button Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    CheckBox1: TCheckBox;    ImageList1: TImageList;    SpeedButton1: TSpeedButton;    procedure CheckBox1Change(Sender: TObject);  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.CheckBox1Change(Sender: TObject);begin  SpeedButton1.Enabled := CheckBox1.Checked;  Repaint;end; end. ---------------------------------------------------------------------- wp · 2025-03-27 12:16 I cannot confirm this - see attached mini-demo. ---------------------------------------------------------------------- daniel_sap · 2025-03-27 12:50 Quote from: wp on March 27, 2025, 01:16:59 pmI cannot confirm this - see attached mini-demo. I tried your project is working as expected on my side The difference on my side is that images are 16x16 I created a mini demo also and attach it here. Also attached the original image I test with ---------------------------------------------------------------------- wp · 2025-03-27 13:24 Your demo is working correctly. The problem is that your image is almost black&white. Therefore, the conversion to grayscale is barely visible. Find a different image (there is a large collection of free icons in the folder images/general_purpose of the Lazarus installation). Or modify it by some pixel editor to look more like you think it should, add it to the image list and specify its index in the DisabledImageIndex property. ---------------------------------------------------------------------- daniel_sap · 2025-03-28 06:51 Quote from: wp on March 27, 2025, 02:24:20 pmYour demo is working correctly. The problem is that your image is almost black&white. Therefore, the conversion to grayscale is barely visible. Find a different image (there is a large collection of free icons in the folder images/general_purpose of the Lazarus installation). Or modify it by some pixel editor to look more like you think it should, add it to the image list and specify its index in the DisabledImageIndex property. Thank you, wp I changed few icons and works good. However, will go in direction for custom mask for drawing the disabled images. For me black color as any other color can look disabled.