I have a TGradient Label in a TTabSheet with gradient central.
When programmatically I change its Enabled state from True to False the gradient disappears. Same if then I try to re-enable it. To get it to repaint correctly the gradient I've to switch to another TTabSheet and back to the previous one.
I've tried to add a MyGradientLabel.Repaint after change of Enabled state but nothing changed.
A video of behavior:
I retested this here but I could not see an issue.
Can you isolate this and send a sample source project + steps with which we can reproduce this here?
I will try to isolate the code but it is very complex (a lot of things to remove).
Seems the issue is in the fact that I'm not using a:
Form-> TPageXxx -> TSheetTab -> TGradientLabel
but a run time created:
TFrame -> TPageXxx -> TSheetTab -> TGradientLabel with Frame.Parent assigned dinamically to a TForm.
Perhaps so OS WM_xxx is lost and does not reach the Windowed parent of TGradientLable.
I've solved it just by calling TxxSheetTab.Refresh.
If you could send a test project, we will investigate.
I've created a new project with a similar structure of TForm -> TFrame -> TPageControl -> TTabSheet -> TGradientLabel and all works fine.
I've checked and I do not use Themes.
I've to check any other property of listed objects and if I get the error I will place here the code.
Unfortunately, the original project is very big (close to 2.000.000 code lines with a lot of 3rd party libraries so I can't place it here).