mos Posted June 4, 2020 Share Posted June 4, 2020 In the screenshot below there are two TUniImages the one on the left has Enabled set to True while the one on the right has Enabled set to False. When the image is disabled a grey area appears surrounding the image as the image does not fully occupy the whole area of the TUniImage. Is it possible to remove this grey area so that the white background appears but still show the green tick as disabled (it will look like the image on the left but only the green tick will show as disabled). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 4, 2020 Share Posted June 4, 2020 5 hours ago, mos said: In the screenshot below there are two TUniImages the one on the left has Enabled set to True while the one on the right has Enabled set to False. When the image is disabled a grey area appears surrounding the image as the image does not fully occupy the whole area of the TUniImage. Is it possible to remove this grey area so that the white background appears but still show the green tick as disabled (it will look like the image on the left but only the green tick will show as disabled). Hello, One possible solution is to use a CSS rule I think. procedure TMainForm.UniButton1Click(Sender: TObject); begin UniImage1.JSInterface.JSCall('setStyle', ['opacity', 0.5]); // instead of Enabled=False UniImage1.JSInterface.JSCall('setStyle', ['opacity', 1]); // instead of Enabled=True end; Quote Link to comment Share on other sites More sharing options...
mos Posted June 5, 2020 Author Share Posted June 5, 2020 Thank you that worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.