4D v15OBJECT Get corner radius |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v15
OBJECT Get corner radius
|
OBJECT Get corner radius ( {* ;} object ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, object is an object name (string) If omitted, object is a variable or a field | |||||
object | Form object |
![]() |
Object name (if * is specified) or Variable or field (if * is omitted) | |||||
Function result | Longint |
![]() |
Current radius for the rounded corners (in pixels) | |||||
Originally introduced in 4D v14 R4
Theme: Objects (Forms)
The new OBJECT Get corner radius command returns the current rounded corner radius of the rounded rectangle object(s) whose name you passed in object. This value can have been set at the form level using the Property list (see New corner radius property), or using the new OBJECT SET CORNER RADIUS command for the current process.
If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a field or a variable. In this case, you pass a field or variable reference (object field or variable only) instead of a string.
Note: In current 4D releases, since this command only applies to rounded rectangles (which are static objects), you must always pass the * parameter and use the object name syntax.
The command returns the radius value in pixels for the object corners. By default, the value is 5 pixels.
The following code could be added to a button method:
C_LONGINT($radius)
$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
Product: 4D
Theme: Language
4D v15 - Upgrade (standard edition) ( 4D v15)