| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIFileClass > AsciiFileClass Methods >====== GetPercentile (convert file position to percentage:ASCIIFileClass) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[getline return line of text .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[init initialize the asciifileclass object .htm|{{btn_next_n.gif|Next page}}]] | | || **GetPercentile( **//line number //**)** {{blk2blue.jpg|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**