TextBox.LineCount 屬性

定義

取得在文字方塊中的總行數。

public:
 property int LineCount { int get(); };
public int LineCount { get; }
member this.LineCount : int
Public ReadOnly Property LineCount As Integer

屬性值

Int32

文字方塊中的行總數,如果無法使用版面配置資訊,則為 -1。

備註

如果已啟用文字換行,變更文字方塊的寬度可能會變更此值。

傳回的值是文字方塊中的行總數,不論目前可見的行數為何。

適用於

另請參閱