第2个问题难1点不是ascII的代码
总不能显示

解决方案 »

  1.   

    var
      I, nRow, nStart: Integer;
    begin
      nRow := StrToInt(Edit1.Text);//要改变颜色的行号(从1开始)
      with RichEdit1 do begin
        nStart := 0;
        for I := 0 to nRow - 2 do Inc(nStart, Length(Lines[I]));
        SelStart := nStart;
        SelLength := Length(Lines[nRow - 1]);
        SelAttributes.Color := clRed;//把nRow行变成红色
      end;
    end;为什么要显示不可见字符?你能确信这些字符可以显示(比如在其它软件里见过)?
      

  2.   

    TO:楼上,
    for I := 0 to nRow - 2 do Inc(nStart, Length(Lines[I]));
    这句应改为:
    for I := 0 to nRow - 2 do Inc(nStart, Length(Lines[I])+2);