Main Help →
GENerel Commmands →
Using Panes
Splitting Records into Multiple Panes
Normally the data for any one kind of record is formatted by a single template (e.g., "INDI Record Editing" template for Individual records). If the data in such records gets long, however, a browser style might prefer to divide the display into sections by using "Panes" or "Tabs." This help topic explains how to write templates for multipane displays.
Multipane Setup Basics
The following steps can divide any record into any number of panes:
- Decide how you want to divide the record and assign each section a unique string ID. For example, you might want to split an individual in "Details", "Events", "Multimedia", "Notes", "Sources", and "Other". Each has to be assigned an ID as well. Here the words in quotes can be IDs too, but the ID need not match the title. The ID, however, cannot have any spaces.
- One section should be selected as the main entry point where the record will open when first opened from the file's index window. In the above example, the "Details" section can function as the main entry point. The string ID for this section will be an empty string.
- Rewrite the main record editing template to display just the data from the section designated in step 2 as the main entry section. In the example, the "INDI Record Editing" template will display just some seleted details (e.g., name, birth, death, and family links) and hide all other data. You will likely need the Hide command or the HideExcess command to prevent extra data from showing in the window.
- Write a series of record editing templates for each of the other sections. The name of the template is the base record name, the underscore character, and the string ID for each section. In the example, you would write "INDI_Events Record Editing", "INDI_Multimedia Record Editing", "INDI_Notes Record Editing", "INDI_Sources Record Editing", and "INDI_Other Record Editing". Each of these template displays a subset of the data. Note, however, that each template has access to the entire record and thus can show as much as you want. It can be useful to display the same data in multiple sections. For individual records, for example, you might want every section to display and allow editing of the individual's name. Fnially, to unwanted data out of a section, you will likely need the Hide command or the HideExcess command.
- Create buttons that allow the user to open each section of the record (as explained in the next section).
Creating an Index for the Panes
When you split a record into sections, each section will need buttons to allow the user to open the other sections. The most common approach is buttons across the top of the display (like tabs in a tabbed window), but you can locate the buttons where ever you want. There are two options for creating these buttons:
- The most direct method is to use a PaneBar cell. This cell creates a standard MacOS tab bar of buttons and each button can be set up to link to a different section of the record. Normally this PaneBar cell should be at the top of the display for each section. A good approach is to write a subroutine template to create the PaneBar cell and call that subroutine at the beginning of the record editing template for each section.
- Besides PaneBar cells, any LinkButton cell can load any section of another record by setting its PaneID property to the string ID of the desired section. These buttons can be located anywhere in the display.
Examples
Two browser styles provided with GEDitCOM II that use multiplane displays are "The Default Format" and the "Pedigree Format." You can open these in the GEDitCOM Editor to see how they work. Both use PaneBar cells at the top of the display to provide access to the sections. Both create the pan bars in subroutine templates.