lines

lines(): Integer;

The lines method of the JadeTextEdit, ListBox, and TextBox control classes returns the number of lines available for display in the control. Effectively, this method returns the client height (clientHeight property value) divided by the height of each line.

If the integralHeight property is set to false, the last line may be a partial line, which is included in the count.

The code fragment in the following example shows the use of the lines method.

foreach count in 1 to listBoxRight.lines do
    iter.next(myProduct);
    listBoxRight.addItem(myProduct.name);
endforeach;