| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIViewerClass > AsciiViewerClass Methods >====== SetLine (position to specific line) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[reset reset the asciiviewerclass object .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setlinerelative move n lines .htm|{{btn_next_n.gif|Next page}}]] | | || **SetLine( **//line number //**), PROTECTED, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **SetLine** | Positions the ASCIIViewerClass object to a specific line. | | //line number// | An integer constant, variable, EQUATE or expresssion that contains the offset or position of the line of text to position to. | The **SetLine **method positions the ASCIIViewerClass object to a specific line within the browsed file. **Implementation:** The AskGotoLine method, the ASCIIFileClass.SetPercentile method, and the ASCIISearchClass.Ask method all use the SetLine method to position to the required text line. **Example:** **MyViewerClass.AskGotoLine PROCEDURE** **LineNo  LONG,STATIC** **OKGo    BOOL(False)** **GotoDialog WINDOW('Goto'),AT(,,96,38),GRAY,DOUBLE** **       SPIN(@n_5),AT(36,4,56,13),USE(LineNo),RANGE(1,99999)** **       PROMPT('&Line No:'),AT(4,9,32,10),USE(?Prompt1)** **       BUTTON('&Go'),AT(8,22,40,14),USE(?GoButton)** **       BUTTON('&Cancel'),AT(52,22,40,14),USE(?CancelButton)** **     END** **  CODE** **  OPEN(GotoDialog)** **  ACCEPT** **    CASE EVENT()** **    OF EVENT:Accepted** **      CASE ACCEPTED()** **      OF ?GoButton** **        OKGo=True** **        POST(EVENT:CloseWindow)** **      OF ?CancelButton** **        POST(EVENT:CloseWindow)** **      END** **    END** **  END** **  CLOSE(GotoDialog)** **  IF OKGo THEN SELF.SetLine(LineNo).** **See Also:     **[[askgotoline go to user specified line .htm|AskGoToLine]], [[setpercentile set file to relative position .htm|ASCIIFileClass.SetPercentile]], [[ask solicit search specifications .htm|ASCIISearchClass.Ask]]