Skip to main content
Version: Next

OBJECT SET PADDING

OBJECT SET PADDING ( * ; object : Text ; padding : Object )
OBJECT SET PADDING ( object : Variable, Field ; padding : Object )

ParameterTypeDescription
*Operator→If specified, object is an object name (string)
If omitted, object is a variable or field
objectText, Variable, Field→Object name (if * is specified) or
Variable or field (if * is omitted)
paddingObject→Padding values
History
ReleaseChanges
21 R5Created

Description​

The OBJECT SET PADDING command sets the padding of the object(s) designated by the object and * parameters.

If you pass the optional * parameter, this indicates that the object parameter is an object name (a string). If you do not pass this parameter, this indicates that object is a variable or field. In this case, you pass a variable or field reference instead of a string.

In padding, pass an object containing the following properties:

PropertyTypeDescription
topIntegerPadding between the content and the top border
bottomIntegerPadding between the content and the bottom border
leftIntegerPadding between the content and the left border
rightIntegerPadding between the content and the right border

All properties are optional. If a property is omitted, its current value remains unchanged.

Padding values are expressed in pixels. If a negative value is assigned, the effective padding is set to 0.

Padding can be applied to the following types of form objects:

For list boxes, list box columns, and list box headers and footers, the same padding object is used, but only the top and left values are taken into account for rendering:

  • top is applied as both top and bottom padding,
  • left is applied as both left and right padding.

Example​

var $padding:={top: 20; left: 10}
OBJECT SET PADDING(*; "List box"; $padding)

The top value is applied to the top and bottom padding, while the left value is applied to the left and right padding.

See also​

OBJECT Get padding
OBJECT Get vertical alignment
OBJECT SET VERTICAL ALIGNMENT

Properties​

Command number1865
Thread safeno