Click or drag to resize
CellBorders Class
Represents the cell borders for a given cell.
Inheritance Hierarchy
SystemObject
  Stingray.GridCellBorders

Namespace: Stingray.Grid
Assembly: Stingray.GridUtils (in Stingray.GridUtils.dll) Version: 14.0.0.0
Syntax
[SerializableAttribute]
public class CellBorders : ICloneable

The CellBorders type exposes the following members.

Constructors
  NameDescription
Public methodCellBorders
Initializes a new CellBorders.
Public methodCellBorders(OGPen)
Initializes a new CellBorders using a specified pen for all sides.
Public methodCellBorders(OGPen, OGPen)
Initializes a new CellBorders using two different pens.
Public methodCellBorders(OGPen, OGPen, OGPen, OGPen)
Initializes a new CellBorders using four different pens.
Top
Methods
  NameDescription
Public methodClone
Creates a copy of this CellBorders object.
Public methodEquals
Determines whether the specified object is equal to the current CellBorders isntance.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Calculates the hash code for a CellBorders object.
(Overrides ObjectGetHashCode.)
Public methodIsAllBordersSame
Checks if all border styles are the same.
Top
Properties
  NameDescription
Public propertyBottom
Gets the bottom border style.
Public propertyLeft
Gets the left border style.
Public propertyRight
Gets the right border style.
Public propertyTop
Gets the top border style.
Top
Remarks
A cell's borders are accessible via the Borders. CellBorders represents the line style used for the top, left, bottom, and right borders of a cell. Consequently, this class includes the properties Top, Left, Bottom, and Right, each of which gets or sets an OGPen. OGPen draws the corresponding cell border. The following C# source code uses the Borders property to set the cell borders for cell 1,1 to solid, black lines.
GridControl1[12, 3].Style.Borders =
  new Stingray.Grid.CellBorders(
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1),
    new OGPen(BorderDashStyle.Solid, Color.Black, 1));
See Also