Delphi // 指定输入游标的位置 procedure SetCaret(RTF: TRichEdit; var Row, Col: Word); var i, iStopLine, iSelStart: integer; begin if (RTF = nil) then Exit; if Row = 0 then Row := 1; !-- frame contents -- !-- /frame contents -- if Col = 0 then Col := 1;// 到第 Row 列, Col 行共几个字元 iStopLine := Row - 1; iSelStart := 0; for i := 0 to RTF.Lines.Count - 1 do begin if i = iS...[ 查看全文 ]