ActionTest demo -> Close the last tab

General TRichView support forum. Please post your questions here
Post Reply
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

ActionTest demo -> Close the last tab

Post by starhu »

Hello,

I have written a program which uses ActionTest demo (with tabs) as base.
It contains a TRVTabSet.

The customer wants to be able to close the last document too, so only the empty area would be shown (in the original demo one cannot close the last tab).

Is this possible?

Thank you very much!
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, it's possible.
Assign SRVTabSet.CloseButton.AllowCloseLastTab = True.
Also, you will need to modify all the code assuming that at least one editor exists. For example, TForm3.AddEditor copies properties from ActiveEditor to a new editor; you need to modify this code to assign properties of a new editor instead of copying them from ActiveEditor (because, if all editors are closed, nil must be assigned to ActioveEditor).
May be other similar changes are required.
Post Reply