CAL Box Creation Commands

Commands

DBOX coords [fieldname]
FRAME coords [text]
TEXT coords [text]
PICT coords [filename]
BUTTON coords [scriptname]
SUBFM coords
ARROWBOX coords
FRAMEDBOX coords [fieldname] [text]

To create a new box on the form:

  1. Specify the box type with the appropriate keyword.
  2. Type four integers giving the rectangular coordinates of the box after the keyword.
  3. If desired, type a text string giving further information appropriate to the box type, as shown below:
Box Type String
Data box Name of database field to be displayed in the box.
Frame Static label for upper left.
Text Static text.
Picture Pathname of a Windows metafile
Button Pathname of a script file, or name as it appears on Scripts menu
Subform <nothing>
Arrowbox <nothing>
Framedbox Name of database field to be displayed in the box, and static label for upper left.

If the text string is omitted, you can supply it later using SETFIELD or SETTEXT. For a button, you must use SETTEXT if you want its visible label to be different from the name of its script.

Box coordinates are specified in this order: left, top, right, bottom. Units are in pixels; the origin is at the upper left, with coordinates increasing from left to right and top to bottom, so that coordinates will range from left = 0 to right = 640 or 1024 or whatever fits your screen, and from top = 0 to bottom = 480 or 768 or similar.

When a new box is created, it adopts the current font. To specify a particular font for a box, use the FONT command prior to creating the box.

When specifying a script name, give one of the following:

  • The complete pathname of the script file.
  • A simple name without extension, if the script is stored in the standard scripts subdirectory with the standard file extension. If the script name appears on the Scripts menu, you can use the name from the menu.

Examples

Command Action
FRAME 10 10 300 60 Molecular Formula Create frame with label at upper left.
DBOX 20 20 290 50 formula Create data box for formula in above frame.
TEXT 100 100 300 150 "A Label" Create a static text string.
PICT 500 300 600 400 C:\LOGO.WMF Put specified picture at lower right.
BUTTON 500 10 550 40 DEMO Create button at upper right to run script DEMO.CFS.
 


2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email   info@cambridgesoft.com
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA