FarPoint.Win.Spread.AlternatingRow.GetHashCode
This example returns the hash code for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
Dim i As Integer
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.BackColor = Color.Red
i = altrow.GetHashCode()
ListBox1.Items.Add(i.ToString())
FarPoint.Win.Spread.AlternatingRow altrow;
int i;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.BackColor = Color.Red;
i = altrow.GetHashCode();
listBox1.Items.Add(i.ToString());
FarPoint.Win.Spread.AlternatingRow.Border
This example specifies the border for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.Border = New FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Lowered, Color.Blue, Color.LightBlue, 2)
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.Border = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Lowered, Color.Blue, Color.LightBlue, 2);
FarPoint.Win.Spread.AlternatingRow.CellType
This example specifies the cell type for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.CellType = New FarPoint.Win.Spread.CellType.ButtonCellType()
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.CellType = new FarPoint.Win.Spread.CellType.ButtonCellType();
FarPoint.Win.Spread.AlternatingRow.Font
This example specifies the font for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Test"
FpSpread1.ActiveSheet.Cells(1, 0).Text = "For"
FpSpread1.ActiveSheet.Cells(2, 0).Text = "Fonts"
Dim FontDB As New FontDialog()
If (FontDB.ShowDialog() = DialogResult.OK) Then
altrow.Font = FontDB.Font
End If
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Test";
fpSpread1.ActiveSheet.Cells[1, 0].Text = "For";
fpSpread1.ActiveSheet.Cells[2, 0].Text = "Fonts";
FontDialog FontDB = new FontDialog();
if (FontDB.ShowDialog() == DialogResult.OK)
{
altrow.Font = FontDB.Font;
}
FarPoint.Win.Spread.AlternatingRow.ForeColor
This example specifies the text color for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.ForeColor = Color.Blue
FpSpread1.ActiveSheet.Cells(0, 0).Text = "ForeColor"
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.ForeColor = Color.Blue;
fpSpread1.ActiveSheet.Cells[0, 0].Text = "ForeColor";
FarPoint.Win.Spread.AlternatingRow.HorizontalAlignment
FarPoint.Win.Spread.AlternatingRow.VerticalAlignment
This example specifies the text alignment for the alternating row.
Dim altrow As FarPoint.Win.Spread.AlternatingRow
altrow = FpSpread1.ActiveSheet.AlternatingRows(0)
altrow.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
altrow.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top
FpSpread1.ActiveSheet.Rows(0).Height = 80
FpSpread1.ActiveSheet.Columns(0).Width = 120
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Alignment"
FarPoint.Win.Spread.AlternatingRow altrow;
altrow = fpSpread1.ActiveSheet.AlternatingRows[0];
altrow.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
altrow.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top;
fpSpread1.ActiveSheet.Rows[0].Height = 80;
fpSpread1.ActiveSheet.Columns[0].Width = 120;
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Alignment";
FarPoint.Win.Spread.Cell.Border
This example creates a border around the first cell in the spreadsheet.
Dim acell As FarPoint.Win.Spread.Cell
Dim bord As New FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.Red, Color.Blue)
acell = FpSpread1.ActiveSheet.Cells(0, 0)
acell.Border = bord
FarPoint.Win.Spread.Cell acell;
FarPoint.Win.BevelBorder bord = new FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised, Color.Red, Color.Blue);
acell = fpSpread1.ActiveSheet.Cells[0, 0];
acell.Border = bord;
FarPoint.Win.Spread.Cell.CellType
This example creates a checkbox cell.
Dim acell As FarPoint.Win.Spread.Cell
Dim ck As New FarPoint.Win.Spread.CellType.CheckBoxCellType()
acell = FpSpread1.ActiveSheet.Cells(0, 0)
acell.CellType = ck
FarPoint.Win.Spread.Cell acell;
FarPoint.Win.Spread.CellType.CheckBoxCellType ck = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
acell = fpSpread1.ActiveSheet.Cells[0, 0];
acell.CellType = ck;
FarPoint.Win.Spread.Cell.ColumnSpan
This example sets up a cell span over three columns and three rows.
Dim acell As FarPoint.Win.Spread.Cell
acell = FpSpread1.ActiveSheet.Cells(0, 0)
acell.ColumnSpan = 3
acell.RowSpan = 3
acell.Text = "Span"
FarPoint.Win.Spread.Cell acell;
acell = fpSpread1.ActiveSheet.Cells[0, 0];
acell.ColumnSpan = 3;
acell.RowSpan = 3;
acell.Text = "Span";
FarPoint.Win.Spread.Cell Alignment and Locked
FarPoint.Win.Spread.HorizontalAlignment
FarPoint.Win.Spread.VerticalAlignment
FarPoint.Win.Spread.Locked
FarPoint.Win.Spread.CellHorizontalAlignment enumeration
FarPoint.Win.Spread.CellVerticalAlignment enumeration
This example locks the cell to prevent the user from editing the contents of the cell.
Imports FarPoint.Win.Spread
Imports FarPoint.Win
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim acell As FarPoint.Win.Spread.Cell
acell = FpSpread1.ActiveSheet.Cells(0, 0)
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Alignment"
acell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
acell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top
acell.Locked = True
FpSpread1.ActiveSheet.Rows(0).Height = 80
End Sub
using FarPoint.Win.Spread;
using FarPoint.Win;
private void Form1_Load(object sender, System.EventArgs e)
{
FarPoint.Win.Spread.Cell acell;
acell = fpSpread1.ActiveSheet.Cells[0, 0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Alignment";
acell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
acell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top;
acell.Locked = true;
fpSpread1.ActiveSheet.Rows[0].Height = 80;
}
FarPoint.Win.Spread.Cell.Note
This example supplies a note for the cell.
Dim acell As FarPoint.Win.Spread.Cell
acell = FpSpread1.ActiveSheet.Cells(0, 0)
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Note Test"
acell.Note = "This is a note"
FarPoint.Win.Spread.Cell acell;
acell = fpSpread1.ActiveSheet.Cells[0, 0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Note Test";
acell.Note = "This is a note";
FarPoint.Win.Spread.Column.Add
This example adds a column to the sheet.
Dim col As FarPoint.Win.Spread.Column
FpSpread1.ColumnCount = 1
col = FpSpread1.ActiveSheet.Columns(0)
col.Add()
FpSpread1.ActiveSheet.Cells(0, 0).Text = "<-Added"
FarPoint.Win.Spread.Column col;
fpSpread1.ActiveSheet.ColumnCount = 1;
col = fpSpread1.ActiveSheet.Columns[0];
col.Add();
fpSpread1.ActiveSheet.Cells[0, 0].Text = "<-Added";
FarPoint.Win.Spread.Column.GetPreferredWidth
FarPoint.Win.Spread.Column.Width
This example determines the width of the column based on the text in the first cell.
Dim col As FarPoint.Win.Spread.Column
Dim s As Single
col = FpSpread1.ActiveSheet.Columns(0)
FpSpread1.ActiveSheet.Cells(0, 0).Text = "This text is used to determine the width of the column"
s = col.GetPreferredWidth()
col.Width = s
FarPoint.Win.Spread.Column col;
float s;
col = fpSpread1.ActiveSheet.Columns[0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "This text is used to determine the width of the column";
s = col.GetPreferredWidth();
col.Width = s;
FarPoint.Win.Spread.Column.Remove
This example removes the first column from the active sheet.
Dim col As FarPoint.Win.Spread.Column
FpSpread1.ActiveSheet.ColumnCount = 3
col = FpSpread1.ActiveSheet.Columns(0)
col.Remove()
FarPoint.Win.Spread.Column col;
fpSpread1.ActiveSheet.ColumnCount = 3;
col = fpSpread1.ActiveSheet.Columns[0];
col.Remove();
FarPoint.Win.Spread.Column.AllowAutoSort
This example specifies whether a column allows automatic sorting.
Dim col As FarPoint.Win.Spread.Column
col = FpSpread1.ActiveSheet.Columns(0)
FpSpread1.ActiveSheet.Cells(0, 0).Text = "Alignment"
FpSpread1.ActiveSheet.Cells(1, 0).Text = "CarbAdjust"
FpSpread1.ActiveSheet.Cells(2, 0).Text = "Brakes"
col.SortIndicator = FarPoint.Win.Spread.Model.SortIndicator.Descending
col.ShowSortIndicator = True
col.AllowAutoSort = True
FarPoint.Win.Spread.Column col;
col = fpSpread1.ActiveSheet.Columns[0];
fpSpread1.ActiveSheet.Cells[0, 0].Text = "Alignment";
fpSpread1.ActiveSheet.Cells[1, 0].Text = "CarbAdjust";
fpSpread1.ActiveSheet.Cells[2, 0].Text = "Brakes";
col.SortIndicator = FarPoint.Win.Spread.Model.SortIndicator.Descending;
col.ShowSortIndicator = true;
col.AllowAutoSort = true;
FarPoint.Win.Spread.Column.BackColor
This example specifies the background color for the column.
Dim col As FarPoint.Win.Spread.Column
col = FpSpread1.ActiveSheet.Columns(0)
col.BackColor = Color.Yellow
FarPoint.Win.Spread.Column col;
col = fpSpread1.ActiveSheet.Columns[0];
col.BackColor = Color.Yellow;
FarPoint.Win.Spread.Column.Border
This example specifies the border for the column.
Dim col As FarPoint.Win.Spread.Column
Dim bord As New FarPoint.Win.RoundedLineBorder(Color.Blue, 1)
col = FpSpread1.ActiveSheet.Columns(0)
col.Border = bord
FarPoint.Win.Spread.Column col;
FarPoint.Win.RoundedLineBorder bord = new FarPoint.Win.RoundedLineBorder(Color.Blue, 1);;
col = fpSpread1.ActiveSheet.Columns[0];
col.Border = bord;
FarPoint.Win.Spread.Column.Invalidate
This example invalidates the specified column.
FpSpread1.ActiveSheet.Columns(0).Invalidate()
FpSpread1.ActiveSheet.Columns[0].Invalidate();
FarPoint.Win.Spread.Column.VisualStyles
This example sets the setting of visual styles (XP themes) for the specified column.
FpSpread1.ActiveSheet.Columns(0).VisualStyles = FarPoint.Win.VisualStyles.On
FpSpread1.ActiveSheet.Columns(0).VisualStyles = FarPoint.Win.VisualStyles.On;
FarPoint.Win.Spread.Column.ResetVisualStyles
This example resets the setting for visual styles (XP themes) for the specified column.
FpSpread1.ActiveSheet.Columns(0).ResetVisualStyles()
FpSpread1.ActiveSheet.Columns(0).ResetVisualStyles;
FarPoint.Win.Spread.Row.PageBreak
This example sets whether a hard page break is inserted before this row when printing.
Dim r As FarPoint.Win.Spread.Row
r = FpSpread1.ActiveSheet.Rows(0, 3)
r.PageBreak = True
FarPoint.Win.Spread.Row r;
r = fpSpread1.ActiveSheet.Rows[0, 3];
r.PageBreak = true;
FarPoint.Win.Spread.Row.Parent
This example returns the Rows collection containing this row.
Dim r As FarPoint.Win.Spread.Row
Dim rs As FarPoint.Win.Spread.Rows
r = FpSpread1.ActiveSheet.Cells(0, 0, 250, 250).Row
rs = r.Parent
ListBox1.Items.Add(rs.ToString())
FarPoint.Win.Spread.Row r;
FarPoint.Win.Spread.Rows rs;
r = fpSpread1.ActiveSheet.Cells[0, 0, 250, 250].Row;
rs = r.Parent;
listBox1.Items.Add(rs.ToString());
FarPoint.Win.Spread.Row.ParentStyleName
FarPoint.Win.Spread.Row.StyleName
This example sets the style name and parent style name for this row.
Dim r As FarPoint.Win.Spread.Row
r = FpSpread1.ActiveSheet.Rows(0)
r.ParentStyleName = "Parent"
r.StyleName = "Style"
FarPoint.Win.Spread.Row r;
r = fpSpread1.ActiveSheet.Rows[0];
r.ParentStyleName = "Parent";
r.StyleName = "Style";
FarPoint.Win.Spread.Row.Resizable
This example specifies whether the row can be resized.
Dim r As FarPoint.Win.Spread.Row
r = FpSpread1.ActiveSheet.Rows(0)
r.Resizable = False
FarPoint.Win.Spread.Row r;
r = fpSpread1.ActiveSheet.Rows[0];
r.Resizable = false;
FarPoint.Win.Spread.Row.Tag
This example sets the application-defined tag value associated with this row.
Dim r As FarPoint.Win.Spread.Row
r = FpSpread1.ActiveSheet.Rows(0)
r.Tag = "Row"
FarPoint.Win.Spread.Row r;
r = fpSpread1.ActiveSheet.Rows[0];
r.Tag = "Row";
FarPoint.Win.Spread.Row.Visible
This example specifies if the row is visible.
Dim r As FarPoint.Win.Spread.Row
r = FpSpread1.ActiveSheet.Rows(0)
r.Visible = False
FarPoint.Win.Spread.Row r;
r = fpSpread1.ActiveSheet.Rows[0];
r.Visible = false;