mos Posted June 4, 2020 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
Sherzod Posted June 4, 2020 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
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.