Previous: 201: Introducing Forms (Graphical Layout)


Panorama is a database, not an illustration program, so let’s get to the heart of the matter — working with live data in a form. Panorama has nearly a dozen types types of objects that can display and or modify database data: Text Editor Object, Text Display Object, Text List Object, Web Browser Object, Image Display Object, Data Button Object (checkboxes and radio buttons), Popup Menu Button Object, Slider Object, Stepper Object and Scroll Bar Object.

Text Editor Object

The Text Editor Object is used to display and edit text in a database field or variable. It is one of the most commonly used type of objects. To create one, you drag it from the Object Library, like any other kind of object. Then you need to use the inspector panel to assign a field, either by typing in the field name or using the pop-up menu.

When the form is switched to data mode, Text Editor objects become “live” – they are linked directly to the database. You can click a Text Editor object to edit the field. When you’re done, press the Return, Enter or Tab key, or click in another spot. The database will update with the new value.

This works in reverse too – if you edit the data sheet, Text Editor objects linked to the same field will immediately update to show the new value.

This linkage also works as you move about to different records in the database – Text Editor objects always show the data in the currently selected record.

Text Editor objects have many more advanced features available, see Text Editor Object to learn all about them.

Text Display Object

A Text Display Object is used to display text using a formula. Text Display objects are workhorses, they will be another of your most frequently used objects. They can be simple or complex, as the two examples below illustrate:

Text Display objects are not limited to fixed text, they can display data from fields, variables, and complete formulas. Text Display objects are not limited to a single style, they can include multiple fonts, styles, and colors, and even images. And last but not least, Text Display objects are dynamic – they can scroll, trigger procedures, and you can select and copy text in one of these objects.

When you create a new Text Display object, the first thing you’ll want to do is set up the formula that specifies what information to display. This is done with the Formula pane of the Object Inspector Panel. In this example, the formula is simply the Last field name.

Like a text editor object, a Text Display object becomes “live” when the form is switched to data mode. When you move to a different record, the text display updates, as it does when data is edited.

Simple Text Display Formulas

The power of a Text Display object comes from the formula. The most fundamental formula building blocks are concatenation (+) and quoted text.

To concatenate (“glue” together) two items of text, use the + operator. For example,

First + Last

will stick together the first and last names in a database. Of course, usually you’d want a space between the first and last names, and to do that you’ll need some quoted text (this is called a text “constant”).

First + " " + Last

You can include any fixed text you want simply by enclosing it in quotes. For example, if you want a comma and a space, just put them in quotes.

Last + ", " + First

For more information about quoting text, including how to put quotes in quoted text, see Constants.

Carriage Return To put a carriage return (new line) into a formula, you can either use the cr() function, use the ¶ symbol (Option-7), or you can put a return in between quotes. Here is a formula that uses this method to create an address label.

First+" "+Last+cr()+Address+cr()+City+", "+State+" "+Zip

Here’s what this formula looks like when used in a text display object.

More Complex Display Formulas

Panorama has hundreds of operators and functions that can be used to build complex formulas, allowing the displayed text to be customized any way you want.

First[1,1]+". "+Last+cr()+Address+cr()+upper(City)+", "+State+" "+Zip

The beginning of this formula, First[1,1], uses a Text Funnel to display only the person’s first initial, instead of the entire first name. Later, the formula uses the upper( function to display the city name in all upper caps.

To lean more about using formulas to manipulate text, see Text Formulas. The Formula Workshop is a great way to experiment with formulas — I often use this wizard to get a formula working the way I want, then transfer the finished formula to a Text Display or other object.

Note: Text Display objects have an alternative “literal text” mode that doesn’t use a formula to specify the text. To learn about this mode, see Text Display Object.

Text Appearance Options

By default, text objects display text using the default system font, but you can customize the font and size using either the Fonts tool or the Text pane of the Object Inspector Panel.

To choose whether text is aligned left, center or right, use the Text pane of the Object Inspector Panel.

Different types of text objects also have many additional appearance options, including how multi-line text is wrapped, whether or not there is a scroll bar, what kind of border appears around the object, and much more. See Text Editor Object and Text Display Object to learn about these options.


Next: 203: Creating a Data Entry Form


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, with updates.