OBJECT Get corner radius
OBJECT Get corner radius ( {* ;} object ) : Integer
Parameter | Type | Description | |
---|---|---|---|
* | Operator | → | If specified, object is an object name (string) If omitted, object is a variable or a field |
object | any | → | Object name (if * is specified) or Field or variable (if * is omitted) |
Function result | Integer | ← | Radius of rounded corners (in pixels) |
Description
The OBJECT Get corner radius command returns the current value of the corner radius for the object designated by the object parameter. This value may have been set at the form level using the Corner radius property or for the current process using the OBJECT SET CORNER RADIUS command.
The OBJECT Get corner radius command can be used with the following form objects:
- rectangles
- inputs (4D projects only)
- text areas (4D projects only)
Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a field or variable. In this case, you pass a field or variable reference instead of a string (field or variable object only).
This command returns the radius of rounded corners in pixels.
Note: The command returns 0 when applied to an object that does not support the corner radius property.
Example
The following code could be added to a button method:
var $radius : Integer
$radius:=OBJECT Get corner radius(*;"GreenRect") //get current value
OBJECT SET CORNER RADIUS(*;"GreenRect";$radius+1) //increase radius
// Maximum value will be handled automatically:
// when reached, the button no longer has any effect
See also
Properties
Command number | 1324 |
Thread safe | ✗ |