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

Home

 
4D v20.6
OBJECT SET CORNER RADIUS

OBJECT SET CORNER RADIUS 


 

OBJECT SET CORNER RADIUS ( {* ;} object ; radius ) 
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)
radius  Longint in New radius of rounded corners (in pixels)

The OBJECT SET CORNER RADIUS command modifies the radius of corners for the object(s) you passed in the object parameter. The new radius is only set for the process and is not saved in the form itself. 

You can use this command 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). 

In the radius parameter, you pass a new radius value in pixels to be applied to the corners of the object. 

Note: With input and text area objects, the corner radius property is only available with "none", "solid", or "dotted" border line styles.

You can modify this value at the form level using the Corner radius property (see also Corner radius (rectangles)).

You have the following rectangles in your form, named respectively "Rect1" and "Rect2":

You can execute the following code to change their corners:

 OBJECT SET CORNER RADIUS(*;"Rect@";20)

You have the following text area in your form, named "required-label":

If you execute the following code:

 OBJECT SET CORNER RADIUS(*;"required-label";10)

Note that for text areas (as well as inputs), unlike for rectangles, the corner roundness is drawn outside the initial area of the object.



See also 

OBJECT Get corner radius

 
PROPERTIES 

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

 
PAGE CONTENTS 
 
HISTORY 

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

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)