ToolStripTextBox.GetFirstCharIndexFromLine(Int32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the index of the first character of a given line.
public:
int GetFirstCharIndexFromLine(int lineNumber);
public int GetFirstCharIndexFromLine (int lineNumber);
member this.GetFirstCharIndexFromLine : int -> int
Public Function GetFirstCharIndexFromLine (lineNumber As Integer) As Integer
- lineNumber
- Int32
The line for which to get the index of its first character.
The zero-based character index in the specified line.
If the lineNum
parameter is negative, GetFirstCharIndexFromLine returns 0. If the lineNum
parameter exceeds the number of lines in the control, GetFirstCharIndexFromLine returns the first character index for the last line in the control.
GetFirstCharIndexFromLine returns the first character index of a physical line. The physical line is the displayed line, not the assigned line. The number of displayed lines can be greater than the number of assigned lines due to word wrap. For example, if you assign two long lines to a RichTextBox control and set Multiline and WordWrap to true
, the two long assigned lines result in four physical (or displayed lines).
Termék | Verziók |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: