Skip to main content
Version: Next

OBJECT SET CORNER RADIUS

OBJECT SET CORNER RADIUS ( {* ;} object ; radius )

ParameterTypeDescription
*OperatorIf specified, object is an object name (string)
If omitted, object is a variable or a field
objectanyObject name (if * is specified) or Field or variable (if * is omitted)
radiusIntegerNew radius of rounded corners (in pixels)

This command is not thread-safe, it cannot be used in preemptive code.

Description

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

Example 1

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)

Example 2

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