4D v16.3

OBJECT Get corner radius

Home

 
4D v16.3
OBJECT Get corner radius

OBJECT Get corner radius 


 

OBJECT Get corner radius ( {* ;} object ) -> Function result 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a variable or a field
object  Form object in Object name (if * is specified) or Field or variable (if * is omitted)
Function result  Longint in Radius of rounded corners (in pixels)

The OBJECT Get corner radius command returns the current value of the corner radius for the rounded rectangle object whose name is passed in the object parameter. This value may have been set at the form level using the Property list (see Corner radius (rectangles)), or for the current process using the OBJECT SET CORNER RADIUS command.

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).

Note: In the current version of 4D, this command only applies to rounded rectangles (which are static objects). As a result, only the syntax based on the object name (using the * parameter) is supported.

This command returns the radius of rounded corners in pixels. By default, this value is 5 pixels.  

Example  

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



See also 

OBJECT SET CORNER RADIUS

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1324

 
HISTORY 

Created: 4D v14 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)