ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage syntax / WLanguage types / Advanced types
  • Default characteristics of border
  • WLanguage properties that can be used with the Border type
  • Type of line for the border
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Border (Variable type)
In french: Cadre
The Border type is used to handle a border programmatically. The characteristics of this border can be modified by several WLanguage properties.
A Border type can be used:
  • WINDEVAndroidiPhone/iPadIOS WidgetMac Catalyst in the controls of a window (Border property).
  • WINDEV in the cells of a Table control in a window (Border property of cells of Table controls).
  • in the controls of a report (Border property).
    Android Not available.
  • in the drawing functions (dBorder).
  • WINDEVWEBDEV - Server code in Excel cells (Border property of cells in an Excel document).
  • WINDEVWEBDEV - Server code in the paragraphs of a Word Processing document (Border property on the layout options of docParagraph variables).
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Define the characteristics of the borders for report controls
MyBorder is Border
MyBorder.Color = LightRed
MyBorder.Thickness = 5

// Borders for the NumNbPage control in the report
NumNbPage.Border = MyBorder
// Modify the characteristics of the borders for the NumNbPage control
NumNbPage.Border.Thickness = 1

// Get the characteristics of the borders for the NumNbPage control
MyBorder2 is Border = NumNbPage.Border
// Define the border characteristics
MyBorder is Border
MyBorder.Color = LightRed
MyBorder.Thickness = 5

// Borders for the NumNbPage control in the report
NumNbPage.Border = MyBorder
// Modify the characteristics of the borders for the NumNbPage control
NumNbPage.Border.TopLeftCorner.Width = 2
NumNbPage.Border.TopLeftCorner.Height = 3
WINDEV
// Configures the borders
MyBorder is Border
MyBorder.Color = LightRed 
MyBorder.Thickness = 5

// Specific feature of the bottom line
MyBorder.LineBottom.Type = LineDash
MyBorder.LineBottom.Color = DarkRed

// Applies the borders to cell 2, 2 (2nd row, 2nd column)
TABLE_MyTable[2,2].Border = MyBorder
// or 
TABLE_MyTable.COL_NoName2[2].Border = MyBorder
Remarks

Default characteristics of border

By default, a border found in a report has the following characteristics:
  • thickness set to 0. The border is visible if the thickness is greater than 0. The border is invisible if the thickness is set to 0.
  • black.
  • solid line.
  • no rounded corners.
  • all the border edges are displayed.
WINDEVWEBDEV - Server code By default, the border of a cell found in an XLS worksheet has the same characteristics. However, the thickness of the line and the rounding of corners are not supported for an XLS cell.
WINDEV By default, in a Table control cell, a border has the following characteristics:
  • thickness set to 0. The border is visible if the thickness is greater than 0. The border is invisible if the thickness is set to 0.
  • transparent.
  • solid line.
  • no rounded corners.
  • no border edge displayed.
To define the characteristics of a border through programming, use the border properties.

WLanguage properties that can be used with the Border type

The following properties can be used to define the characteristics of Border variables.
Property nameType usedEffect
BottomLeftCornerCharacteristics of the lower-left corner:
  • property width: width of frame corner (real).
  • property Height: height of frame corner (real).
Not supported in XLS cells.
BottomRightCornerCharacteristics of the lower-right corner:
  • property width: width of frame corner (real).
  • property Height: height of frame corner (real).
Not supported in XLS cells.
ColorIntegerBorder color. This color can correspond to:
This property can be used:
  • In modification: the color of all edges is modified.
  • In read mode, this property returns:
    • the color of the borders if all the borders have the same color.
    • the ColorUndefined constant if all the borders do not have the same color.
EdgesInteger constantReturns and modifies the presence of edges. This property can correspond to a combination of the following options:
  • EdgeNo: frame has no edge.
  • BordBas: the frame has a low edge.
  • Straight edge: the frame has a straight edge.
  • Left edge: the frame has a left edge.
  • High edge: the frame has a high edge.
  • EdgeAll: all frame edges are displayed.
LineInteger constantReturns and modifies the type of line for the border (see the next paragraph).
  • In edit mode, modifies the type of line for all borders.
  • In read mode, returns:
    • the type of line for the borders if this parameter is identical for all borders.
    • the TypeUndefined constant if all the borders do not have the same line.
Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
LineBottomCharacteristics of the bottom line:
  • property Color: Line color: This color can correspond either to an RGB color (obtained with the RGB function), or to a preset color.
  • Property Thickness (Real): Line thickness (in millimetres in printouts and in pixels in graphics functions).
  • Property Type (constant of type Integer): Line type (see next paragraph).
    Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
Not supported in XLS cells.
LineLeftCharacteristics of the left line:
  • property Color: Line color: This color can correspond either to an RGB color (obtained with the RGB function), or to a preset color.
  • Property Thickness (Real): Line thickness (in millimetres in printouts and in pixels in graphics functions).
  • Property Type (constant of type Integer): Line type (see next paragraph).
    Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
Not supported in XLS cells.
LineRightCharacteristics of the right line:
  • property Color: Line color: This color can correspond either to an RGB color (obtained with the RGB function), or to a preset color.
  • Property Thickness (Real): Line thickness (in millimetres in printouts and in pixels in graphics functions).
  • Property Type (constant of type Integer): Line type (see next paragraph).
    Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
Not supported in XLS cells.
LineTopCharacteristics of the top line:
  • property Color: Line color: This color can correspond either to an RGB color (obtained with the RGB function), or to a preset color.
  • Property Thickness (Real): Line thickness (in millimetres in printouts and in pixels in graphics functions).
  • Property Type (constant of type Integer): Line type (see next paragraph).
    Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
Not supported in XLS cells.
RoundRealValue of rounding for the corners. Corresponds to the radius of rounding.
  • In modification, modifies the rounding of all corners.
  • In read mode, returns:
    • the width and the height of corners if these parameters are identical for all corners.
    • the RoundingUndefined constant if all the corners do not have the same width and height.
Not supported:
  • in the XLS cells.
  • in the prargraphs of Word Processing documents.
ThicknessRealReturns and modifies the thickness of the border (in millimeters in the prints and in pixels in the graphic functions).
  • In edit mode, changes the thickness of all the borders.
  • In read mode, returns:
    • the thickness of the borders if the parameter is the same for all the borders.
    • the ThicknessUndefined constant if all the borders do not have the same thickness.
Not supported in XLS cells.
TopLeftCornerCharacteristics of the upper-left corner:
  • property width: width of frame corner (real).
  • property Height: height of frame corner (real).
Not supported in XLS cells.
TopRightCornerCharacteristics of the upper-right corner:
  • property width: width of frame corner (real).
  • property Height: height of frame corner (real).
Not supported in XLS cells.

These properties can be used:
  • on the Border variable. Example:
    MyBorder is Border
    MyBorder.Color = LightRed
    MyBorder.Thickness = 5
  • or on the Cadre property of the manipulated element.
    // Modify a characteristic of the border for the NumNbPage element
    NumNbPage.Border.Thickness = 1
Note: It is also possible to assign the characteristics of a programmed frame directly to an element:
// Define the border characteristics
MyBorder is Border
MyBorder.Color = LightRed
MyBorder.Thickness = 5

// Borders for the NumNbPage control in the report
NumNbPage.Border = MyBorder

Type of line for the border

The Type property is used to define and get the type of line of the border. The available constants are as follows (caution: the effect of these constants will differ when the border is used in a report or when it is used for a cell in an Excel document).
Android The type of line will only be taken into account for frames where all corners are rounded and all edges have the same color and thickness.
ConstantEffect in ExcelEffect in a reportEffect in dBorder
LineNoneNo line.No line.No line.
LineSolid
with the thickness defined in millimeters.
LineSolidThick
with the thickness defined in millimeters.
LineSolidMedium
with the thickness defined in millimeters.
LineDouble
with the thickness defined in millimeters.
LineDotAndDash
with the thickness defined in millimeters.
LineDotAndDashMedium
with the thickness defined in millimeters.
LineDotAndDashDoubleDash
with the thickness defined in millimeters.
LineDotAndDashDoubleDashMedium
with the thickness defined in millimeters.
LineDotted
with the thickness defined in millimeters
LineDottedMedium
with the thickness defined in millimeters
LineDash
with the thickness defined in millimeters.
LineDashMedium
with the thickness defined in millimeters.
Minimum version required
  • Version 14
This page is also available for…
Comments
Exemplo borda
// Blog com video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2017/02/aula-1057-windev-tabela-042-border.html

https://www.youtube.com/watch?v=ljp4A2Jg2RU

http://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2103-aula-1057-windev-tabela-042-border-novidade-windev/read.awp

//==========================================
// Vou Mostrar como Alterar a Borda Via programacao.
// vou Fazer um colando borda na coluna de uma linha
// da tabela

_configura is a Border
_configura..Thickness = 2 // Espessura
_configura..Color = PastelRed // Cor
_configura..LineBottom..Color = DarkRed // Cor Linha Inferir
_configura..LineBottom..Type =LineDash // Tipo Linha

TABLE_indices[3].COL_Valor..Border = _configura
LIB_observacao..Border=_configura
Info("Continua.. Outras Configurações")

//Outras Configurações
_configura..Round=4 // Borda Arredondada

_configura..Line=TraitTiret // Tipo Da Linha

_configura..Edges=BorderBottom // Borda tem somente inferior

TABLE_indices[3].COL_Valor..Border = _configura
LIB_observacao..Border=_configura

De matos
04 Feb. 2017

Last update: 02/12/2025

Send a report | Local help