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.
The following code could be added to a button method:
C_LONGINT($radius)
$radius:=OBJECT Get corner radius(*;"GreenRect")
OBJECT SET CORNER RADIUS(*;"GreenRect";$radius+1)