GrapeCity MultiRow Windows Forms Documentation
Border Constructor(LineStyle,Color)
Example 


The LineStyle of the Line used for all sides.
The System.Drawing.Color of the Line used for all sides.
Initializes a new instance of the Border class using the supplied LineStyle and System.Drawing.Color for all sides.
Syntax
Public Function New( _
   ByVal style As LineStyle, _
   ByVal color As Color _
)
Dim style As LineStyle
Dim color As Color
 
Dim instance As New Border(style, color)
public Border( 
   LineStyle style,
   Color color
)

Parameters

style
The LineStyle of the Line used for all sides.
color
The System.Drawing.Color of the Line used for all sides.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not a valid LineStyle value.
Example
This example creates a border.
GrapeCity.Win.MultiRow.Template template = new GrapeCity.Win.MultiRow.Template();
GrapeCity.Win.MultiRow.ColumnHeaderSection columnHeaderSection1 = new GrapeCity.Win.MultiRow.ColumnHeaderSection();
GrapeCity.Win.MultiRow.ColumnHeaderCell columnHeaderCell1 = new GrapeCity.Win.MultiRow.ColumnHeaderCell();
GrapeCity.Win.MultiRow.ColumnHeaderCell cCell1 = new GrapeCity.Win.MultiRow.ColumnHeaderCell();
GrapeCity.Win.MultiRow.Border bord = new GrapeCity.Win.MultiRow.Border(GrapeCity.Win.MultiRow.LineStyle.DashDot, Color.SaddleBrown);
cCell1.Value = "Col 2";
columnHeaderCell1.Value = "Col 1";
GrapeCity.Win.MultiRow.TextBoxCell textBoxCell1 = new GrapeCity.Win.MultiRow.TextBoxCell();
GrapeCity.Win.MultiRow.CheckBoxCell cBoxCell1 = new GrapeCity.Win.MultiRow.CheckBoxCell();
template.Width = textBoxCell1.Size.Width + cBoxCell1.Width;
template.Row.Cells.Add(textBoxCell1);
cBoxCell1.Location = new Point(textBoxCell1.Width, 0);
template.Row.Cells.Add(cBoxCell1);
template.Row.Height = textBoxCell1.Size.Height;
//template.Row.Border = bord;
template.Row.Cells[0].Style.Border = bord;
columnHeaderSection1.Cells.Add(columnHeaderCell1);
cCell1.Location = new Point(columnHeaderCell1.Width, 0);
columnHeaderSection1.Cells.Add(cCell1);
columnHeaderSection1.Height = columnHeaderCell1.Size.Height;
template.ColumnHeaders.Add(columnHeaderSection1);
gcMultiRow1.Template = template;
gcMultiRow1.RowCount = 5;
Dim template As GrapeCity.Win.MultiRow.Template = New GrapeCity.Win.MultiRow.Template()
Dim columnHeaderSection1 As GrapeCity.Win.MultiRow.ColumnHeaderSection = New GrapeCity.Win.MultiRow.ColumnHeaderSection()
Dim columnHeaderCell1 As GrapeCity.Win.MultiRow.ColumnHeaderCell = New GrapeCity.Win.MultiRow.ColumnHeaderCell()
Dim cCell1 As GrapeCity.Win.MultiRow.ColumnHeaderCell = New GrapeCity.Win.MultiRow.ColumnHeaderCell()
Dim bord As New GrapeCity.Win.MultiRow.Border(GrapeCity.Win.MultiRow.LineStyle.DashDot, Color.SaddleBrown)
cCell1.Value = "Col 2"
columnHeaderCell1.Value = "Col 1"
Dim textBoxCell1 As GrapeCity.Win.MultiRow.TextBoxCell = New GrapeCity.Win.MultiRow.TextBoxCell()
Dim cBoxCell1 As GrapeCity.Win.MultiRow.CheckBoxCell = New GrapeCity.Win.MultiRow.CheckBoxCell()
template.Width = textBoxCell1.Size.Width + cBoxCell1.Width
template.Row.Cells.Add(textBoxCell1)
cBoxCell1.Location = New Point(textBoxCell1.Width, 0)
template.Row.Cells.Add(cBoxCell1)
template.Row.Height = textBoxCell1.Size.Height
'template.Row.Border = bord
template.Row.Cells(0).Style.Border = bord
columnHeaderSection1.Cells.Add(columnHeaderCell1)
cCell1.Location = New Point(columnHeaderCell1.Width, 0)
columnHeaderSection1.Cells.Add(cCell1)
columnHeaderSection1.Height = columnHeaderCell1.Size.Height
template.ColumnHeaders.Add(columnHeaderSection1)

GcMultiRow1.Template = template
GcMultiRow1.RowCount = 5
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Border Class
Border Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.