149
Defining controls
This section contains only two kinds of tags:
CONTROL
and
CONTAINER
tags.
CONTROL
and
CONTAINER
tags represent graphical controls. The tags are identical in definition, with
the exception that only
CONTAINER
tags have the capability to contain
CONTROL
tags.
A Panel control is a good example of a control that can be a
CONTAINER
containing a
CONTROL
, such as Labels or TextBoxes.
Look at the following example:
<TAG>
<EDITORLAYOUT HEIGHT=50 WIDTH=200>
<CONTAINER NAME="Panel1" TYPE="Panel" WIDTH=150 HEIGHT=50>
<CONTROL NAME="lblCode" TYPE="label" CAPTION="Code" DOWN=20
RIGHT=20 WIDTH=70/>
<CONTROL NAME="txtCode" TYPE="TextBox" ANCHOR="lblCode"
<CORNER="NE" WIDTH="30"/>
</CONTAINER>
</EDITORLAYOUT>
</TAG>
You can name the above template MYTAG.VTM and test it by attempting to edit an
empty MYTAG tag. The tag editor looks like this:
The example displays a single Panel
CONTAINER
containing Label and TextBox controls.
Only a few controls can be containers:
•
TabDialog — A tab dialog control capable of containing TabPage container
controls.
•
TabPage — Only used inside a TabDialog container control.
•
Panel — A general purpose panel container control which can contain any
regular or container controls.
You might have noticed that the control represented by a
CONTROL
or a
CONTAINER
tag is
defined by the
TYPE
attribute. We can also see that
WIDTH
and
HEIGHT
attributes
determine the size.
The
ANCHOR
and
CORNER
attributes determine the point relative to which the control is
positioned. The
ANCHOR
can be specified as the name of any control that was already
laid down. The corner specifies the corner of the anchor control to be used for
positioning. The possible choices are
NE
,
NW
,
SE
, and
SW
. The
DOWN
and
RIGHT
attributes
then specify the pixel offset from the anchor control.
Summary of Contents for COLDFUSION STUDIO 4.5-USING COLDFUSION...
Page 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Page 16: ...xvi Contacting Allaire...
Page 90: ...82...
Page 130: ...122...
Page 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Page 182: ...190...