Working with Tab Pages
Contents of Article
SPFLite divides the screen into multiple tabbed sections, to support the editing or browsing of multiple files from a single SPFLite instance.
Each open file is displayed and manipulated within a separate tab page in the SPFLite window. These sections are often referred to as "file tabs" or just "tabs", but may contain any of the following within a tab:
- File Manager. Is always the left-most tab. The File Manager may display a directory list, or a File List.
- Edit tab. Contains a file opened for editing.
- Empty tab. Contains a new, empty file that has no name and has not yet been saved.
- Cloned tab. Contains a copy of an existing file, which has not yet been given a new name and has not yet been saved. A temporary name with an * and a file extension will appear.
- Multi-Edit tab. Contains a set of multiple files opened for editing.
- Browse tab. Contains a file opened for browse. Browse is a read-only edit session, in which changes cannot be saved.
- Clipboard tab. Contains the contents of the Windows clipboard, allowing you to directly edit it. At most one clipboard tab may be present.
- SET Edit tab. Contains the values for all defined SET variables. At most one SET Edit tab may be present.
The screen below shows SPFLite with nine open tabs.
The base file name of a file being edited (without the file's path) is used as the label for each tab. When a file tab is selected (made active) the tab itself is displayed with a different background color, and the full filename, including the path, is shown in the SPFLite windows title bar.
The data being edited in each tab is completely separate from the data in any other tabs. However, some SPFLite program data is used in common with all tabs. This includes:
To switch between tabs you can either use the mouse to left-click on the desired tab, or you can use the SPFLite primary commands SWAP PREV to switch to the previous tab, and SWAP NEXT to switch to the next tab. Note: Both SWAP PREV and SWAP NEXT will wrap if there are no more tabs in the indicated direction.
There is also a SWAP PRIOR command which can be used to alternate displays of two tabs. SWAP PRIOR swaps to the previously displayed tab. Note: If you click on one tab, and then click on a second (different) tab, then from that point on, each time you issue a SWAP PRIOR command, it will alternate the active screen between those two tabs. That is, SWAP PRIOR will always alternative between the last two active file tabs.
If you use these functions in other software, you may wish to map SWAP NEXT to Ctrl-Tab and SWAP PREV to Ctrl-Shift-Tab for compatibility with these applications.
Whether you switch among file tabs using the mouse or the SWAP commands, SPFLite will maintain your current cursor position in every file tab, where you will find it if you a leave a file tab and then return back to it.
When SPFLite is started, the File Manager tab will be displayed with your default directory list displayed. If you have enabled the Global Option for Re-Open last file(s) at Start, the files that were left open the last time SPFLite was closed will also appear in their own tabs.
To open a file for Edit or Browse, enter the appropriate command character (E or B) next to the desired files. Each selected file will be opened in its own tab. You can also select multiple files to be combined in a single Multi-Edit session with the M line command. See Working with Multi-Edit Sessions for more information.
In File Manager, Left-Click on New in the Quick Launch bar (or enter a non-blank to its left), or enter the EDIT NEW command, to open a new, empty file.
You can return to the File Manager tab at any time to select other additional files for processing, by clicking on the File Manager tab, or by issuing a SWAP HOME command.
If you issue a CANCEL command rather then END, the edit data is deleted and the tab returned to an (Empty) status. The tab is not closed by the CANCEL command.
You may also close a tab by Right-clicking on the tab header. This is treated as equivalent to issuing an END command and all normal END processing takes place as usual.
If you click on the main window close button X, SPFLite will close every tab. As each file is closed, the file is either saved or not saved, with or without a prompt to you, depending on how the AUTOSAVE option is set in the Profile for that file's type.
SPFLite can provide a visible indication when a file has been modified but not yet saved, by altering the color of the text in the Tab header for that file.
The colors to be used are under your control, and are specified in the Options - Screen dialog.
In order to benefit from this feature, it's up to you to pick good, contrasting colors. SPFLite does not predefine the color palettes during installation to accomplish this. The dialog below shows an example of how this might be done:
Here is an example of how these color choices would appear in the main edit window. The current file tab shows red lettering because MODIFIED.TXT is modified, while SAVED.TXT is in blue lettering because it is unmodified.
Created with the Personal Edition of HelpNDoc: Free help authoring environment