Working with Tab Pages

Contents of Article


Introduction

Data isolation

Switching between tabs

Opening a new tab

Closing a tab

Indicating file-modified status in the tab header

Example


Introduction


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:










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.


Data isolation


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: 



Switching between tabs


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.


Opening a new tab


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.


Closing a tab


A tab will be closed when an END command is issued.  END may also save the data depending on your AUTOSAVE setting.  Following END processing the tab will be closed and disappear from the screen.


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.  


Indicating file-modified status in the tab header


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:



Example


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: Write EPub books for the iPad