Navigation: ABC Library Reference > ASCIIFileClass > AsciiFileClass Methods >====== GetLastLineNo (return last line number) ====== | |
GetLastLineNo, PROC
The GetLastLineNo method returns the number of the last line in the file, and indexes the entire file.
Return Data Type: LONG
Example:
MyViewer.TakeScroll PROCEDURE(UNSIGNED EventNo)
LineNo LONG
CODE
IF FIELD()=SELF.ListBox
IF EVENT() = EVENT:ScrollBottom !on scroll bottom
LineNo = SELF.GetLastLineNo() !index to end of file
SELF.DisplayPage(LineNo-SELF.ListBoxItems+1) !display last page
SELECT(SELF.ListBox,SELF.ListBoxItems) !highlight last row
END
END