TextBoxBase.GetFirstCharIndexFromLine メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Public Function GetFirstCharIndexFromLine ( _ lineNumber As Integer _ ) As Integer
Dim instance As TextBoxBase Dim lineNumber As Integer Dim returnValue As Integer returnValue = instance.GetFirstCharIndexFromLine(lineNumber)
public int GetFirstCharIndexFromLine ( int lineNumber )
public: int GetFirstCharIndexFromLine ( int lineNumber )
public int GetFirstCharIndexFromLine ( int lineNumber )
戻り値
指定した行における 0 から始まる文字のインデックス。


lineNum パラメータが負の場合、GetFirstCharIndexFromLine は 0 を返します。また、lineNum パラメータがコントロールの行数を超えている場合、GetFirstCharIndexFromLine は -1 を返します。
GetFirstCharIndexFromLine は、物理行の最初の文字のインデックスを返します。物理行は、割り当てられた行ではなく、表示されている行です。ワード ラップが原因で、表示されている行の数が割り当てられた行の数を上回る場合があります。たとえば、2 つの長い行を RichTextBox コントロールに割り当て、Multiline と WordWrap を true に設定すると、割り当てられた 2 つの長い行が 4 つの物理行 (表示されている行) になります。

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TextBoxBase クラス
TextBoxBase メンバ
System.Windows.Forms 名前空間
GetCharIndexFromPosition
GetLineFromCharIndex
GetPositionFromCharIndex
GetCharFromPosition
Weblioに収録されているすべての辞書からTextBoxBase.GetFirstCharIndexFromLine メソッドを検索する場合は、下記のリンクをクリックしてください。

- TextBoxBase.GetFirstCharIndexFromLine メソッドのページへのリンク