PowerTCP Emulation for .NET CF
ScrapeCells Method
See Also  Example Send comments on this topic.
Dart.Emulation Namespace > Vt Class : ScrapeCells Method




start
Column/row of first cell, 0-relative, inclusive.
end
Column/row of last cell, 0-relative, inclusive.
mode
The SelectionMode to use.
Retrieves information about the cells in the specified range.

Syntax

Visual Basic (Declaration) 
Public Function ScrapeCells( _
   ByVal start As Point, _
   ByVal end As Point, _
   ByVal mode As SelectionMode _
) As Cell()
Visual Basic (Usage)Copy Code
Dim instance As Vt
Dim start As Point
Dim end As Point
Dim mode As SelectionMode
Dim value() As Cell
 
value = instance.ScrapeCells(start, end, mode)
C# 
public Cell[] ScrapeCells( 
   Point start,
   Point end,
   SelectionMode mode
)
Managed Extensions for C++ 
public: Cell[]* ScrapeCells( 
   Point start,
   Point end,
   SelectionMode mode
) 
C++/CLI 
public:
array<Cell>^ ScrapeCells( 
   Point start,
   Point end,
   SelectionMode mode
) 

Parameters

start
Column/row of first cell, 0-relative, inclusive.
end
Column/row of last cell, 0-relative, inclusive.
mode
The SelectionMode to use.

Return Value

An array of Cell objects, describing each cell in the specified range.

Example

The following example demonstrates how to get information about a cell in the display.
C#Copy Code
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 BasicCopy Code
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

Remarks

Use this method to retrieve an array of Cell objects. Use the Cell object to discover information about the cell, such as its character, formatting, etc. If no cells are selected, this method returns an array of length 0.

Note that the row values are relative to the start of the scrollback buffer. Two cells are included at the end of each row containing a \r (13) and \l (10), respectively.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.