textlisttableoptions
textlisttableoptions
OBJECT
,
OPTIONS

The textlisttableoptions statement sets up text list table options

Parameters

This statement has two parameters:

object – name or ID of a Text List Object (must be in current form).

options – an optional string that contains tags to control the appearance of the table. See below for a description of the available tags.

Description

This statement sets up the table appearance of a Text List Object. The first parameter identifies the Text List Object. Usually it is the name of the object, but it could also be the object ID number.

The second parameter is text that contains one or more tags for modifying the table appearance and operation. Each tag takes the form option=value. If the value contains spaces or other punctuation, it should be quoted (of course you’ll have to use a different type of quotes than are used for the entire parameter).

Here is a typical example:

    textlisttableoptions "Price List",{
        widthunits=characters
        column=Item width=20 align=left
        column="List Price" width=12 align=right
    }

#### TABLE COLUMNS

A table can contain one or more columns (if no columns are specified, the table will have one column). Each column is identified by a separate column= tag. This example defines a table with 5 columns. Since no widths or alignments are specified, defaults will be used.

    textlisttableoptions "Contacts",{
        column=Name
        column=Address
        column=City
        column=State
        column="Zip Code"
    }

You can add tags for width and/or alignment. The only caveat is that if you add a width or alignment specification for any column, you must do it for all columns. This example will not work properly:

    textlisttableoptions "Price List",{
        column=Item
        column="List Price" width=12 align=right
    }

By default, widths are expressed in characters. This is the approximate width needed to display a certain number of characters. Please keep in mind that this is approximate, and the exact number of character that will fit depends on the characters and the font. The nice thing about specifying the width in characters, however, is that the width will adjust automatically if you change the font size.

If you want to specify the width precisely, you can use the widthunits= tag to set the width to points, inches, centimeters (or cm) or characters.

    textlisttableoptions "Contacts",{
        widthunits=inches
        column=Name width="1.5"
        column=Address width="2.5"
        column=City width="2.0"
        column=State width="0.5"
        column="Zip Code" width="1.0"
    }

#### TABLE COLUMNS ALTERNATE NOTATION

An alternate notation is available that allows all of the columns to be specified in a single columns= tag. When using this tag, each column name is separated by a comma.

    textlisttableoptions "Contacts",{
        columns="Name,Address,City,State,Zip Code"
    }

You can also add width and alignment options to each column (alignment may be c or center, or r or right). When using this alternate notation it’s ok to specify the width and/or alignment for some columns but not others (the default width is 10, left aligned).

    textlisttableoptions "Contacts",{
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

The widths are normally specified in characters, but you can use the widthunits= tag to choose other options (see above).

#### TABLE APPEARANCE

There are several tags that modify the appearance of the table.

TableHeader= This tag controls whether or not the column names are displayed at the top of the table. If column names are specified they are normally displayed, but you can turn this off with off, false or no.

    textlisttableoptions "Contacts",{
        tableheader=off
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

AlternatingColors= This tag controls whether or not the table rows are displayed in alternating colors (white and light gray). This is the default for multi-column tables, but you can turn this off with off, false or no. Single column tables are usually displayed with a white background, but you can turn on alternating colors with on, true or yes. (You might want to turn off alternating colors if you are displaying a grid, see below).

    textlisttableoptions "Contacts",{
        alternatingcolors=off
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

VerticalGrid= This tag can be used to enable a vertical grid line between each column.

HorizontalGrid= This tag can be used to enable a solid horizontal grid line between each row.

DashedGrid= This tag can be used to enable a dashed horizontal grid line between each row.

TableTextSize= This tag controls the text size of the table. The available choices are Small, Medium (the default) and Large.

    textlisttableoptions "Contacts",{
        tabletextsize=small
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

#### TABLE SCROLL BARS

The table always includes a vertical scroll bar, and normally also includes a horizontal scroll bar if there is more than one column. You can disable the horizontal scroll bar with the horizontalscroll tag.

    textlisttableoptions "Contacts",{
        horizontalscroll=off
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

If you want low profile scroll bars, use the scroll=thin tag.

    textlisttableoptions "Contacts",{
        scroll=thin
        columns="Name:12, Street:18, City:15c,State:4c,Zip:6c"
    }

#### TABLE SORTING

You can sort the data before you pass it to the table, but the table can also sort (and optionally deduplicate) the data for you.

Sort Setting this tag to on, true or yes tells Panorama to sort the table.

DeDuplicate Setting this tag to on, true or yes tells Panorama to sort and deduplicate the items in the table.

#### SELECTION

Normally you can select one row at a time by clicking on it. Use these tags to modify that behaviour.

MultipleSelection Setting this tag to on, true or yes allows multiple rows to be selected by holding down the Shift or Command keys.

EmptySelection Setting this tag to on, true or yes allows zero rows to be selected. You can do this by holding down the Command key and clicking on the selected row.

KeyboardSelection Setting this tag to on, true or yes allows rows to be selected via the keyboard. Click once to give the table focus, then start typing to select the item you want.

See Also

- activeobjectaction -- allows a procedure to communicate with the object on the current form that is currently being edited (if any).
- changeobject -- modifies the properties of one object in a form.
- changeobjects -- modifies the properties of one or more objects in a form.
- cloneform -- copies all of the objects in a form (optionally, with modifications) into the active form.
- cloneobjects -- duplicates objects in a form (with modifications).
- closeactiveobject -- closes any object whose text is currently being edited.
- datamode -- switches a form from graphics mode into data mode.
- deleteobject -- deletes the specified object from the current form.
- deleteselectedobjects -- deletes selected objects from a form.
- draggraybox -- facilitates dragging something around in a form window.
- dragtext -- starts drag-and-drop of text.
- formcleanview -- cleans up extraneous NSView objects in the current form.
- formxy -- programmatically scrolls a form to a new position.
- graphicsmode -- switches a form into graphics mode.
- info("activeobject") -- returns the name of the currently active text editor or word processor object (if any).
- info("activeobjectid") -- returns the object ID of the currently active text editor or text list object, if any.
- info("activesuperobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("click") -- returns the location of the last mouse click in screen relative coordinates.
- info("clickedobjectid") -- returns the object ID of the clicked object.
- info("focusobject") -- returns the name of the currently active text editor or word processor object, if any.
- info("focusobjectid") -- returns the object ID of the currently active text editor or text list object, if any.
- info("scrollpoint") -- returns the distance the current form is scrolled horizontally and vertically.
- magicformwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magicwindow -- designates an open window as the temporary active window for the purposes of info( functions and graphic statements.
- magnification -- changes the magnification of a form.
- Modifiable Object Properties -- describes the properties of graphic objects that can be modified by a program (dimensions, color, font, title, etc.).
- newformobject -- creates a new graphic object in a form.
- object -- selects an object (based on the object name).
- objectaction -- allows a procedure to communicate with an object on the current form.
- objectid -- selects one graphic object in the current form based on an ID number.
- objectinfo( -- returns information about a graphic object: its location, size, color, font, etc.
- objectinfoarray( -- builds a text array of form object properties
- objectnumber -- identifies one graphic object from a set of selected graphic objects in the current form.
- openasyncprogresswindow -- opens a floating progress window for asynchronous operations (urltask(, timers).
- progressalert -- displays a progress alert if an operation is going to take a long time.
- progressbar -- updates a progress bar on the current form.
- selectallobjects -- selects all the graphic objects in the current form.
- selectnoobjects -- unselects all the graphic objects in the current form.
- selectobjects -- uses a formula to select one or more objects in the current form.
- startgraphicschange -- adds undo support to a procedure.
- Text Display Programming -- programming a Text Display Object.
- Text Editor Programming -- programming a Text Editor Object.
- Web Browser Programming -- programming a Web Browser Object (including JavaScript).
- xytoxy( -- converts a point or rectangle from one co-ordinate system to another.

History

Version | Status | Notes
10.0 | New | New in this version.