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!
ActionTest demo -> Close the last tab
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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.
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.