Inserting TreeBook templates
Feature unique to TreePad Business Edition
In Inserting TreeBook forms we showed how to insert (add) a node containing a TreeBook form into a TreePad database. The layout of the form was copied from a separate TreeBook template (.tpt) file. If the template file is damaged or deleted, it might appear impossible to generate further forms.
But TreePad is much more flexible than this. It allows you to insert a copy of the original template into your current TreePad file, and derive further forms from it, rather than relying on an external template file.
Well, why wasn't this done right from the start? There is a good reason for not carrying around a copy of the original template, apart from the extra space it occupies. If you make any changes to the original template, you have to ensure that you also update any copies of it (not to mention updating forms derived from it, if any). If there is only one template, it is all that needs to be updated.
On the other hand, if the file will be used remotely and the .tpt template may not be available, it makes sense to embed a copy of the template in the actual file. Both methods have their uses.
We will re-create our Simple addressbook using an internal TreeBook template this time. Use a copy of the initial test.tpd file as seen in Fig. 1 of Inserting TreeBook forms. This time, using either Main menu ⁄ Tree ⁄  or  Tree context menu ⁄ , select Insert special ⁄ TreeBook template ⁄ Simple addressbook ⁄ Insert as child1. The node created has an extra icon designating it as a template, and additionally you may be surprised to find that its article is not a form but a standard article, with a message2.

Fig. 1
Take a moment to read the message, which informs you that:
Okay, so edit the node title and article accordingly, as long as you don't convert the article to plain text, which will be unfortunate for the template hidden inside it!
Fig. 2
Now you are ready to copy the first form from it. Press the Insert key.

Fig. 3
By now you might be wondering why we didn't use the Insert special menu. Use the Insert special menu only when inserting an object (node⁄template⁄structure) derived from an external template, e.g., in  \templates.  Use the Insert key or the Tree ⁄ Insert ⁄ menu when inserting a node that will be copied from a template internal to the file. You can see that the Insert new node window offers you the choice of copying the ancestor (current book) template or making the new node's article a blank standard article. Select the former (Choice 1) and click OK.

Fig. 4
Notice that in this method the new node has the default blank node caption, but its article is the form you expected. Rename it as such.

Fig. 5
Note too that John Smith's node has a new alignment icon alongside, which indents child or sibling nodes of a node with a template icon, thus maintaining the visual tree structure and preventing you from mistaking child nodes of templates as siblings.
Let's create a child of John Smith's node with a blank standard article. This time, after focusing on SMITH, John, and pressing Insert, in the Insert new node window select Insert a standard TreePad node and click OK.

Fig. 6

The new node has a blank standard article that you can use for material such as images that cannot yet be accommodated in a TreeBook form:

Fig. 7

With the focus on SMITH, John again, press Enter to create a sibling node, this time making its article another TreeBook form. Repeat this cycle. Notice that the whole cycle only requires you to press Enter twice; once to open the Insert new node window and once again to close it, which makes for an efficient way to create multiple sibling forms. No other action is needed since TreePad saves your option choices each time you close the window. Finally, sort the subtree.

Fig. 8

  1. Users of TreePad PLUS and TreePad SAFE must press Alt+Insert instead, since the Insert special menu item is unique to TreePad Business Edition.
  2. Users of TreePad PLUS and TreePad SAFE who created their own template (see Forms and templates in TreePad PLUS) will find the default article blank, saving them the trouble of deleting the default text in order to insert their own descriptions.
Search ]     [ Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 282 of 563)

This page is created with TreePad