[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomGrid.UpdateBorderStyle

Updates the border style used for the control.

## Declaration

Source position: grids.pas line 1211

`protected procedure TCustomGrid.UpdateBorderStyle;`

## Description

UpdateBorderStyle is a method used to apply a BorderStyle for the control that is valid for the value in the Flat property. When Flat is set to False, the value in BorderStyle is used. When Flat is True, the value bsNone is always used as the BorderStyle for the control.

UpdateBorderStyle calls the inherited SetBorderStyle method to apply the derived value to the BorderStyle property.

UpdateBorderStyle calls VisualChange to refresh the control after the change to the property, and validates the Top and Left for the visual area in the grid. These actions are not performed if the Handle has not been allocated for the control, or during LCL component streaming.

UpdateBorderStyle is called when the value for the Flat property has been changed.

## See also

TCustomGrid.Flat |  | Indicates if cells are displayed using a Flat appearance.
TCustomGrid.BorderStyle |  | Drawing style used for the borders on the control.
TCustomGrid.VisualChange |  | Updates the grid after changes to the visual properties in the control.