AppendDITL
AppendDITL
Append items to the end of a dialog item list. DialogPtr theDialog ; address of a dialog box Handle theDITL ; a handle to the item list DITLMethod method ; specifies the manner of appending
returns none
You can call the AppendDITL procedure to append items to the end of a dialog item list.
theDialog is the address of a dialog box to whose item list you want to append
items.
theDITL a handle to the item list you want to append to that dialog box's
existing item list.
method specifies the manner in which you want the new item list to be
appended. The available methods are defined by constants of type
overlayDITL overlay existing items
appendDITLRight append at right
appendDITLBottom append at bottom
Consider the initial dialog box and list of items to be appended that are
illustrated in the Figure below.
An initial dialog box and a list of items to append
If the method parameter is overlayDITL, the items to be appended are
superimposed on any existing items in the dialog box. The Figure below shows
the result of overlaying new dialog items.
The dialog box after items are overlaid
The positions of the new items are determined by the coordinate system of the
initial dialog box.
If the method parameter is appendDITLRight, the new items are appended to
the right of the dialog box, as illustrated in the Figure below.
The dialog box after items are appended to the right
The positions of the new items are offset by the upper-right coordinate of the
port rectangle of theDialog. AppendDITL automatically expands the dialog box to accommodate the new dialog items. If you know that your application will
need to restore a dialog box to the size it was before you called AppendDITL, you should save the original size before calling AppendDITL. If the method parameter is appendDITLBottom, the new items are appended to
the bottom of the dialog box, as illustrated in the Figure below.
The dialog box after items are appended to the bottom
The positions of the new items are offset by the lower-left coordinate of the
original dialog box. AppendDITL automatically expands the dialog box to accommodate the new dialog items. If you know that your application will need
to restore a dialog box to the size it was before you called AppendDITL, you should save the original size before calling AppendDITL. You can append a list of dialog items relative to existing items in the dialog
box by passing a negative number in the method parameter. The absolute value
of this number is interpreted as the item in the dialog box relative to which
the new items are to be positioned. For example, if the method parameter is
-2, the items to be appended are offset from the upper-left corner of item
number 2, as illustrated in the Figure below.
The dialog box after items are appended relative to Item 2
Because Item 3 was appended relative to the top-left corner of Item 2, it
appears on top of Item 2.
application must get rid of the dialog item list after calling AppendDITL. Here is a typical calling sequence:
AppendDITL(myDialog, myNewItems, appendDITLBottom);
Shortening a Dialog Item List
You can call the ShortenDITL procedure to remove items from the end of a dialog item list.