This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
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 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:

 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

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v14 R4
Modified: 4D v19 R7

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)