Why doesn't this code wrok?Posted by Rbrrneck on July 01, 2002 at 14:46:44:
const red: array[0..1] of String = ('var', 'const'); procedure TForm1.Button1Click(Sender: TObject); var i,i2,i3,i4,i5,i6:integer; begin for i:=0 to Richedit1.lines.count-1 do begin for i2:=0 to High(red) do begin i3:=0; i4:=ansipos(red[i3],Richedit1.lines[i3]); i5:=Length(red[i3]); Richedit1.selstart:=i4-1; Richedit1.sellength:=i5; Richedit1.Selattributes.Color:=clred; i4:=0; i5:=0; end; end; end;
|
|