例如:  一字符串'123456789'  如何实现每2秒在richedit里依次显示  最好有详细代码  麻烦各位了

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls, StdCtrls, ComCtrls;type
      TForm1 = class(TForm)
        RichEdit1: TRichEdit;
        Timer1: TTimer;
        Button1: TButton;
        procedure Timer1Timer(Sender: TObject);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;
      I:integer=1;
    const S:String='123456789';implementation{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);
    begin
      if I<=9 then
      begin
        RichEdit1.Lines.Clear;
        RichEdit1.Lines.Add(S[I]);
        Inc(I);
      end;
    end;记得把 Timer的Interval设置为2000
      

  2.   

    Timer控件
    Interval设为2000呵呵
    楼上的可以