Previous: 202: Forms: Working with Data

Using the techniques described on the previous page, you can manually put together a form for data entry that looks like this:

Depending on how many fields your database has, creating a form object-by-object can be kind of tedious. Fortunately, Panorama can do most of the work for you, automatically creating a pixel perfect layout in seconds.

To demonstrate this, I’ll start with an empty form. Starting with an empty form isn’t actually necessary, but in this case I don’t want to keep any of the objects on my form, so I’ll select Edit>Select All and then Edit>Delete. Or I can simply press Command-A followed by backspace.

To automatically create a basic layout for data entry, choose Construct>Fields & Variables. This opens a dialog sheet that lists all of the fields in the database. If I wanted to omit some fields I could edit them out of the list, since I want all of the objects I simply press the Construct button. Panorama automatically creates a pair of objects for each field: a text editor object, along with a text display object that displays the field name (the caption).

Panorama has automatically created all of the objects needed for my form layout. Each generated object is a separate, independent, object, identical in every way to an object created by dragging from the Object Library. These objects can be selected individually or in groups and manipulated as described on the previous pages.

I can also modify these objects by re-opening the Construct>Fields & Variables dialog and modifying the template – more on that in a moment.

Using the Form to Enter a New Person

To use the new form to enter a new person, start by switching from graphics mode to data mode. Choose Records>Add New Record to add a new record to the end of the database. Then click on the first field and start typing. You can press the tab key to skip from field to field.

Modifying the Form Layout

Suppose I want the Address field in the form to be more than one line high. To modify the form layout, switch the form back to graphics mode. Then I can use Panorama’s graphic tools to manually make this adjustment (see Smart Resize).

Since in this case the Address field was generated by a constructor template, there is another way I can make this change. Instead of using the graphical tools to make this change manually, I can go back to the constructor dialog and modify the template, then regenerate the objects. Each line in the template can be customized with one or more tags that specify various options. For example I can add a <lines> tag to customize the height of the generated object, like this.

When I press the Construct button Panorama regenerates the layout with the specified change.

To learn more about all of the constructor template options, see Automatic Form Construction.

Note: If you close the data entry form (or any form) and then later re-open it, it will open up back in the same spot where you left it. If you would instead like it to always open in a fixed spot, you can specify the initial dimensions for the form. See Newly Opened Database Window Arrangement to learn how to set this up.

Next: 204: Adding Buttons to a Form

See Also


10.0UpdatedCarried over from Panorama 6.0, with updates.