GrapeCity MultiRow Windows Forms Documentation
Border Constructor(Line)
Example 


The line used for the sides of the outline.
Initializes a new instance of the Border class using the supplied line for all sides.
Syntax
Public Function New( _
   ByVal outline As Line _
)
Dim outline As Line
 
Dim instance As New Border(outline)
public Border( 
   Line outline
)

Parameters

outline
The line used for the sides of the outline.
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(new GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.MediumDashDotDot, System.Drawing.Color.Aqua));
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(New GrapeCity.Win.MultiRow.Line(GrapeCity.Win.MultiRow.LineStyle.MediumDashDotDot, System.Drawing.Color.Aqua))
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.