About Dialog Box Components (DCL)

A dialog box consists of the box and the components within it.

In dialog box creation and customization these components are known as tiles. The basic tile types are predefined by the programmable dialog box (PDB) facility. The following figure shows a standard AutoCAD® dialog box, with some of its components labeled.

You can create complex tiles, called prototypes or subassemblies, by grouping tiles into rows and columns, with or without an enclosing box or border. A row or column of tiles is referred to as a cluster. Prototypes and subassemblies can be used in dialog box definitions by tile references. Each reference to a definition inherits the attributes of the original tile. When referring to prototypes, you can change the values of the inherited attributes or add new attributes. When referring to subassemblies, you cannot change or add attributes.

If you need multiple instances of a tile with some attributes in common, it is easiest to define and name a prototype that contains only the common attributes. Then, in each reference to the prototype, you can change attributes or add new ones, but you do not have to list all the common attributes each time you reference the tile. Because attributes are inherited, you will more often need to create tile references—especially references to the predefined tiles—than to define new tiles.

For example, the OK, Cancel, and Help buttons are grouped into a subassembly, defined as a row (cluster) of three button tiles and some spacing separating the buttons. Subassemblies are treated as single tiles. The tiles within a subassembly are called children. DCL files are organized in a tree structure. At the top of the tree is a (dialog) tile that defines the dialog box itself. The following diagram shows a DCL file structure:

The layout, appearance, and behavior of a tile or subassembly are specified in DCL by the tile's attributes. For example, the dialog itself, and most predefined tile types, have a label attribute that specifies the text associated with the tile. The label of a dialog box defines the caption at the top of the dialog box, the label of a button specifies the text inside the button, and so on.

Before you program a dialog box, plan both the dialog box and the application in detail before you code and debug. The sequence in which the data is entered will vary with each user. The need to anticipate a variety of user actions imposes a program structure that is less linear than conventional programming, but is more reflective of the way users work.