OBJECT SET CORNER RADIUS
OBJECT SET CORNER RADIUS ( * ; object : Text ; radius : Integer )
OBJECT SET CORNER RADIUS ( object : Variable, Field ; radius : Integer )
| Parameter | Type | Description | |
|---|---|---|---|
| * | Operator | → | If specified, object is an object name (string) If omitted, object is a variable or a field |
| object | Text, Variable, Field | → | Object name (if * is specified) or Variable or field (if * is omitted) |
| radius | Integer | → | New radius of rounded corners (in pixels) |
History
| Release | Changes |
|---|---|
| 21 R5 | Support for custom-styled buttons, radio buttons and check boxes |
| 19 R7 | Modified |
| 14 R4 | Created |
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)
- custom-styled buttons with "custom" Border Line Style, custom-styled radio buttons and custom-styled check boxes (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.
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.
Example 3
With custom-styled buttons that have a "custom" Border Line Style, the corner radius is drawn inside the initial area of the object:
OBJECT SET CORNER RADIUS(*;"custom-button";8)
See also
OBJECT Get corner radius
OBJECT SET BORDER STYLE
Properties
| Command number | 1323 |
| Thread safe | no |