Page 1 of 1

ActionTest demo -> Close the last tab

Posted: Tue Feb 11, 2014 5:02 pm
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!

Posted: Wed Feb 12, 2014 10:00 am
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.