
Visual Basic (Declaration) | |
---|---|
Public Structure Cell Inherits System.ValueType |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As Cell |
C# | |
---|---|
public struct Cell : System.ValueType |
Managed Extensions for C++ | |
---|---|
public __value struct Cell : public System.ValueType |
C++/CLI | |
---|---|
public value class Cell : public System.ValueType |
The following example demonstrates how to get information about a cell in the display.
C# | ![]() |
---|---|
private string getCellInfo(Point start, Point end, SelectionMode mode) { //Scrape the cell. The useOffset param specifies which overload to use Cell[] cells = vt1.ScrapeCells(start, end, mode); //Display info about the cell string info = "Character: " + cells[0].Character.ToString() + "\r\n"; info += "Raw Character: " + cells[0].RawCharacter.ToString() + "\r\n"; info += "Background color: " + cells[0].BackColor.ToString() + "\r\n"; info += "Foreground color: " + cells[0].ForeColor.ToString() + "\r\n"; info += "Styles: " + cells[0].Styles.ToString(); return info; } |
Visual Basic | ![]() |
---|---|
Private Function getCellInfo(ByVal start As Point, ByVal [end] As Point, ByVal mode As SelectionMode) As String 'Scrape the cell. The useOffset param specifies which overload to use Dim cells() As Cell = vt1.ScrapeCells(start, [end], mode) 'Display info about the cell Dim info As String = "Character: " & cells(0).Character.ToString() & Constants.vbCrLf info &= "Raw Character: " & cells(0).RawCharacter.ToString() & Constants.vbCrLf info &= "Background color: " & cells(0).BackColor.ToString() & Constants.vbCrLf info &= "Foreground color: " & cells(0).ForeColor.ToString() & Constants.vbCrLf info &= "Styles: " & cells(0).Styles.ToString() Return info End Function |
The Vt.ScrapeCells method returns an array of Cell objects for the specified range. Examine the properties of these objects to determining the formatting of each cell. For example, if ScrapeCells is used to scrape the entire contents of the Vt control:
Cell[] cells = Vt.ScrapeCells(new Point(0,0), new Point(Vt.BufferRows + vt.Rows - 1, vt1.Columns - 1), Dart.Emulation.SelectionMode.Standard);
Then cells[0].Character will return the first character contained on the Vt control, cells[0].Styles will return the styles applied to the object, etc.
System.Object
System.ValueType
Dart.Emulation.Cell
Target Platforms: Microsoft .NET Framework 2.0