User Tools

Site Tools


getpercentile_convert_file_position_to_percentage_asciifileclass_.htm
Navigation:  ABC Library Reference > ASCIIFileClass > AsciiFileClass Methods >====== GetPercentile (convert file position to percentage:ASCIIFileClass) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetPercentile( line number )

blk2blue.jpg

GetPercentile Returns the specified position in the file as a percentage.
line number An integer constant, variable, EQUATE or expression that contains the offset or position to convert to a percentage.

The GetPercentile method returns the specified position in the file as an approximate percentage, which can be used to position a vertical scroll bar thumb.

Return Data Type:     USHORT

Example:

SetThumb ROUTINE

!current line is what % thru the file?

PctPos=MyASCIIFile.GetPercentile(MyASCIIFile.TopLine+CHOICE(?ASCIIBox)-1)

?ASCIIBox{PROP:VScrollPos}=PctPos       !set thumb to corresponding % position

getpercentile_convert_file_position_to_percentage_asciifileclass_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)