Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

LineCount – PB Docs 2019 – PowerBuilder Library

LineCount – PB Docs 2019

LineCount

PowerScript function

Description

Determines the number of lines in an edit control that allows
multiple lines.

Applies to

RichTextEdit, MultiLineEdit, EditMask, and DataWindow
controls

Syntax

Argument

Description

editname

The name of the DataWindow control, EditMask,
MultiLineEdit, or RichTextEdit for which you want the number of
lines

Return value

Long.

Returns the number of lines in editname if it succeeds and -1 if an
error occurs. If editname is null, LineCount returns null.

Usage

LineCount counts each visible line, whether it was the result of
wrapping or carriage returns.

When you call LineCount for a DataWindow, it reports the number of
lines in the edit control over the current row and column. A user can
enter multiple lines in a DataWindow column only if it has a text datatype
and its box is large enough to display those lines. The size of the
column’s box determines the number of lines allowed in the column. When
the user is typing, lines do not wrap automatically; the user must press
enter to type additional lines.

In a MultiLineEdit control, lines wrap when the user’s typing fills
the control horizontally, unless either the HScrollBar or AutoHScroll
property is true. If horizontal scrolling is enabled with these
properties, the user must press enter to type additional lines.

A RichTextEdit control always contains an end-of-file mark even if
there is no text in the control. Therefore, its line count is always at
least 1. Other edit controls, when empty, have a line count of 0.

Examples

If the MultiLineEdit mle_Instructions has 9 lines, this example sets
li_Count to 9:

These statements display a MessageBox if fewer than two lines have
been entered in the MultiLineEdit mle_Address:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x