BorderType

The BorderType property is used to display a flat or grooved border around an area frame, grid, or the default entity widget.

"BorderType= | off | groove | flat"

Example: "BorderType=groove"

 
Value Description Image
off Do not show a border  
groove Display a grooved border with a width of 2 pixels around the area frame or entity. 3 D entity border
flat Display a 1-pixel border around area frame or entity. By default the color of the border is dark gray, but this can be changed using the BorderColor property. Flat entity border

Usage

Dynamic? Yes for entities, No for area frames
Dependencies: The BorderColor and BorderRadius properties are applicable only if BorderType is flat.

Description

Use the BorderType property to define a flat border that can be styled, or a grooved border. In both cases, the border is separate from the border defined by the Border or Border (small) properties.

Advantages over Other Border Properties

The BorderType has many advantages over the Border and Border (small) properties. When the BorderType property is set to flat or groove:

  • There is no gap between the inside area and the border. If a background color is applied to the object, it completely fills the object.
  • If the Attach property is true, the border is resized when the entity or frame is resized.
  • The BorderType property can be set in the initialization file.
  • For the default entity widget and grid widget, BorderType can also be set declaratively in the widget properties, and dynamically in ProcScript using $entityproperties.

    To set this property in the Uniface IDE, click the More icon (More icon) in <CPT> Widget Properties, then click More in the Define Properties dialog.

Compatibility

Compatibility issues can arise when setting this property for area or entity frames for which the Border and or Color properties are already set.

  • If both the Border and BorderType properties are set, two borders are displayed.
  • If the Color is set for an area frame or entity, all properties set in the initialization file are ignored, including BorderType and colors.

Setting in ProcScript

For the entity and grid widgets, this property can be set in ProcScript using the $entityProperties or $curEntProperties ProcScript commands.

putitem/id vProperties,"BorderType","flat"
putitem/id vProperties,"BorderColor","red"
$entityproperties(ENTITY.MODEL)=vProperties

Setting in Initialization File

For area frames, you can specify this property on the basis of frame names in the [areaframes] section of the .ini. It is not possible to set this property in the Uniface IDE. For more information, see [areaframes].

[areaframes]
frame_basic=uframe(bordertype=flat;bordercolor=red)

[entities]
MyEnt.MyModel.MyComponent=udefentity(bordertype=flat;bordercolor=green)

Related Topics