NTK Reference

Linked Layouts

When you have too many templates to fit comfortably in one layout, or you have templates that will be visible in the same screen location, it is usually easier to create them in different layout files and then link the layouts to each other. As a rule of thumb, you will have a main layout and your other layouts will be linked to it. To link layouts, follow these steps:

1. Make sure that the main layout file and any sub-layout files are added to the project (see FIGURE A.12).

2. While in the main view, select the Linked Subview tool in the Tool palette (see FIGURE A.12).

3. Drag out a small shape in the main layout (see FIGURE A.13). The size of this linking template does not affect the view size--location and size are determined by the templates in the other layout file.

4. Select this new template and select Link Layout from the File menu (see FIGURE A.13).

5. In the dialog, select the name of the layout file you wish to link (see FIGURE A.13).

The linked subview template in the main layout should now be linked to the layout (see FIGURE A.14).

FIGURE A.12 : The project window and the Tool Palette.


FIGURE A.13 : Linking "detail.t" to the newtApplication template in "main.t".


FIGURE A.14 : Main layout, "main.t", and linked layout, "detail.t".


NTK and Linked Subviews
Declaring and Linked Subviews

An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996