AT (set position and size)

Top  Previous  Next

 

AT([x] [,y] [,width] [,height])

AT

Defines the position and size of the structure or control on which it is placed.

x

An integer constant or constant expression that specifies the horizontal position of the top left corner (PROP:Xpos, equivalent to {PROP:At,1}). If omitted, the runtime library provides a default value.

y

An integer constant or constant expression that specifies the vertical position of the top left corner (PROP:Ypos, equivalent to {PROP:At,2}). If omitted, the runtime library provides a default value.

width

An integer constant or constant expression that specifies the width (PROP:Width, equivalent to {PROP:At,3}). If omitted, the runtime library provides a default value.

height

An integer constant or constant expression that specifies the height (PROP:Height, equivalent to {PROP:At,4}). If omitted, the runtime library provides a default value.

The AT attribute (PROP:AT) is used for positioning Windows and Controls (Win32), and for report structures in both Clarion Win32 and Clarion#. The AT attribute defines the position and size of the structure or control on which it is placed. The x,y position is relative and dependent upon the statement on which the AT attribute is placed.

The values contained in the x, y, width, and height parameters are measured in dialog units for an APPLICATION or WINDOW. The x, y, width, and height parameters on a REPORT without the THOUS, MM, or POINTS attribute are also measured in dialog units.

Dialog units are defined as one-quarter the average character width by one-eighth the average character height. The actual size of a dialog unit is dependent upon the size of the default font for the window or report. This measurement is based on the font specified in the FONT attribute of the window or report, or the system default font specified by Windows (if there is no FONT attribute on the window or report).

Window Usage

The x and y parameters are relative to the top left corner of the video screen when the AT attribute is on an APPLICATION structure, or a WINDOW without the MDI attribute that is opened before an APPLICATION structure is opened by the program.

The x and y parameters are relative to the top left corner of the APPLICATION's client area when the AT attribute is placed on a WINDOW with the MDI attribute, or a WINDOW without the MDI attribute opened after an APPLICATION structure has been opened.

The width and height parameters specify the size of the "client area" or "workspace" of an APPLICATION. This is the area below the MENUBAR and above the status bar which defines the area in which the TOOLBAR is placed and MDI "child" windows are opened. On a WINDOW, they specify the size of the "workspace" which may contain control fields.

Window Control Usage

The x and y parameters are relative to the top left corner of the APPLICATION or WINDOW's client area.

REPORT Structure Usage

The AT attribute on a REPORT structure defines the position and size of the area of the page devoted to printing report detail. This is the area in which all DETAIL structures and any group HEADER and FOOTER structures contained within BREAK structures will print.

Print Structure Usage

The AT attribute on print structures performs two different functions, depending upon the structure on which it is placed.

When placed on a FORM, or page HEADER or FOOTER (not within a BREAK structure), the AT attribute defines the position and size on the page at which the structure prints. The position specified by the x and y parameters is relative to the top left corner of the page.

When placed on a DETAIL, or group HEADER or FOOTER (contained within a BREAK structure), the print structure prints according to the following rules (unless the ABSOLUTE attribute is also present):

·

The width and height parameters of the AT attribute specify the minimum print size of the structure.

·

The structure actually prints at the next available position within the detail print area (specified by the REPORT's AT attribute).

·

The position specified by the x and y parameters of the structure's AT attribute is an offset from the next available print position within the detail print area.

·

The first print structure on the page prints at the top left corner of the detail print area (at the offset specified by its AT attribute).

·

Next and subsequent print structures print relative to the ending position of the previous print structure. If there is room to print the next structure beside the previous structure, it prints there. If not, it prints below the previous.

 

REPORT Control Usage

The x and y parameters are relative to the top left corner of the print structure containing the control.

Example:

WinOne WINDOW,AT(0,0,380,200),MDI !top left corner, relative to app frame

      END

 

WinTwo WINDOW,AT(0,0,380,200)     !Top left corner, relative to video screen

      END

 

!Measurement in dialog units

WinOne WINDOW,AT(0,0,160,400)

       ENTRY,AT(8,40,80,8)       !Approx. 2 characters in, 5 down, 20 wide, 1 high

      END

 

CustRpt REPORT,AT(1000,1000,6500,9000),THOUS !AT specifies detail print area

Detail   DETAIL,AT(0,0,6500,1000)            !AT specifies band size and

                                            !relative position offset from

                                            !last printed detail

         STRING('String Constant'),AT(500,500,1500,500)

                                            !AT specifies control size and

                                            !offset within the detail band

        END

       END

 

CustRpt REPORT,AT(1000,2000,6500,7000),THOUS !1" margins all around

        HEADER,AT(1000,1000,6500,1000)      !Page relative position

         !structure elements                !1" band across top of page

        END

CustD1   DETAIL,AT(0,0,6500,1000)            !Detail relative position

         !structure elements                !1" band across page

        END

CustD2   DETAIL,ABSOLUTE,AT(1000,8000,6500,1000) !Page relative position

         !structure elements                !1" band near page bottom

        END

        FOOTER,AT(1000,9000,6500,1000)      !Page relative position

         !structure elements                !1" band across page bottom

        END

       END

 

CustRpt1 REPORT,AT(1000,1000,6500,9000),THOUS !1" margins all around for

                                             ! detail area on 8.5" x 11"

        !report declarations

        END

 

CustRpt2 REPORT,AT(72,72,468,648),POINTS      !1" margins all around for

                                             !detail area on 8.5" x 11"

        !report declarations

        END

 

See Also:

SETPOSITION

GETPOSITION

PROP:NoHeight/PROP:NoWidth