I am trying to "dim" a whole tabsheet so a notification can be clearly shown - blocking the sheet itself, but not blocking the main form. I guess I'd need an alpha blended panel or a semi-transparent bitmap drawn on a TImage... never really worked with imaging until now so I'm not sure about the terms. Other than the standard components I have Graphics32 installed; can this be achieved with a custom TPanel descendant or with Graphics32 somehow? I would like not to install any 3rd party component just for this if not needed.
Worst case scenario I'll capture the tabsheet as a bitmap and draw it on a alClient panel with Canvas.Draw - which supports opacity.
Using Delphi 10.4.2 if it matters.
Ok, here is the installable component. The dimming is not tied to visible anymore, but to a property Active, which can only be set at runtime. The control to be dimmed isn't tied to the parent at design time, instead there is a published property DimmedControl, which the parent will be set to at runtime (unless it's nil, then no dimming is possible). At design time the component can be dropped anywhere to design the child controls. DimmedControl can be changed at runtime.
The attachment contains packages for runtime and design and a crude demo. I haven't changed aehimself's unit- and class names, which I should have done, but I'm too tired now.
I'm using Delphi 10.3.3, it should work for 10.4.*, too.
Build DimPanel.bpl (runtime) for both Win32 and Win64
Build DimPanelD.bpl (design)
Open and run DemoDim
The component is on the "Additional" tab. If TDimPanel is grayed under Win64, try to close and reopen the IDE.
Hope it roughly works 🙂
Edit: Bug in previous attachment
The size was not set right initially, has been fixed by an override to Loaded