Jump to content
aehimself

How to "dim" a TabSheet?

Recommended Posts

5 hours ago, Renate Schaaf said:

This way it works. Don't set the parent, set DimmedControl to self. The sizes and the anchors are set automatically when active is set to true.


procedure TForm1.Button1Click(Sender: TObject);
begin
 TransparentPanel := TDimPanel.Create(Self);
 TransparentPanel.DimmedControl:=self;
 TransparentPanel.Alpha := 140;
 TransparentPanel.DimColor := clBlack;
 TransparentPanel.Active := True;

end;

Note that once activated, the panel is on top of its dimmedControl, so you would not be able to click on anything on the form. The use of the panel is to temporarily disable input to a part of the application and to give the user visible feedback about it. It acts like a semitransparent glass layer on top of the dimmed window. Looks like you don't want to use it that way. 

 

Thank you very much

It works 100%

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×