OBJECT Get padding
OBJECT Get padding ( * ; object : Text ) : Object
OBJECT Get padding ( object : Variable, Field ) : Object
| Parameter | Type | Description | |
|---|---|---|---|
| * | Operator | → | If specified, object is an object name (string) If omitted, object is a variable or field |
| object | Text, Variable, Field | → | Object name (if * is specified) or Variable or field (if * is omitted) |
| Function result | Object | ← | Padding values |
History
| Release | Changes |
|---|---|
| 21 R5 | Created |
Description
The OBJECT Get padding command returns an object containing the current padding values of the object 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.
Note: If you apply this command to a set of objects, only the padding values for the last object are returned.
The returned object contains the following properties:
| Property | Type | Description |
|---|---|---|
top | Integer | Padding between the content and the top border |
bottom | Integer | Padding between the content and the bottom border |
left | Integer | Padding between the content and the left border |
right | Integer | Padding between the content and the right border |
Padding values are expressed in pixels.
Padding can be retrieved for the following types of form objects:
For list boxes, list box columns, and list box headers and footers, the returned top and bottom values are the same, as are the left and right values.
Example
var $currentPadding:=OBJECT Get padding(*; "My Input")
// $currentPadding = {"left":10,"right":15,"top":20,"bottom":35}
See also
OBJECT SET PADDING
OBJECT Get vertical alignment
OBJECT SET VERTICAL ALIGNMENT
Properties
| Command number | 1866 |
| Thread safe | no |