Y yuan2705 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #1 我是一个刚刚学DELPHI6的初学者因为遇到一些问师想请各位朋友帮下忙问题如下: 在Timer这个控件里用什么代码可以将Label从右到左循环运行?请各位帮忙。再此谢谢各位。
W wjh_wy Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #3 if label1.Width<=form1.Width then label1.Left:=label1.Left+10 else label1.Left:=0-label1.width; end;
B beta Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #5 假如不考虑中文的话: procedure TForm1.Timer1Timer(Sender: TObject); var Str: string; Ch: Char; begin Str := Label1.Caption; Ch := Str[1]; Delete(Str, 1, 1); Str := Str + Ch; Label1.Caption := Str; end;
假如不考虑中文的话: procedure TForm1.Timer1Timer(Sender: TObject); var Str: string; Ch: Char; begin Str := Label1.Caption; Ch := Str[1]; Delete(Str, 1, 1); Str := Str + Ch; Label1.Caption := Str; end;
D dafuweng2003 Unregistered / Unconfirmed GUEST, unregistred user! 2003-01-09 #6 //中文支持 procedure TForm1.Timer1Timer(Sender: TObject); var Str: string; Ch,ch2: Char; begin Str := Label1.Caption; Ch := Str[1]; if ch >= # 127 then begin ch1 := Str[2]; Delete(Str, 1, 2); Str := Str + Ch+ch1; end else begin Delete(Str, 1, 1); Str := Str + Ch; end; Label1.Caption := Str; end;
//中文支持 procedure TForm1.Timer1Timer(Sender: TObject); var Str: string; Ch,ch2: Char; begin Str := Label1.Caption; Ch := Str[1]; if ch >= # 127 then begin ch1 := Str[2]; Delete(Str, 1, 2); Str := Str + Ch+ch1; end else begin Delete(Str, 1, 1); Str := Str + Ch; end; Label1.Caption := Str; end;
T twoghost Unregistered / Unconfirmed GUEST, unregistred user! 2004-04-22 #8 procedure TForm1.Timer1Timer(Sender: TObject); begin if leble.width< form1.width then leble.lefe -10; end; end.
procedure TForm1.Timer1Timer(Sender: TObject); begin if leble.width< form1.width then leble.lefe -10; end; end.