滚动显示(50分)

S

shongyi

Unregistered / Unconfirmed
GUEST, unregistred user!
将不同的字幕滚动显示在某一容器中;
不同的字幕又连接不同的操作,如何实现?相当于滚动的超连接
 
那恐怕要将字作成一个个对象了
 
定义多几个Lable,让他们竖的排列好,标题为你要的字幕,使用一时钟不停的更换其位置
超链就响应Click(Lable有Click吗?),不知道可不可以
 
TO pengjinlongex
想知道你觉的如何?做成对像?什么对像呢?我曾试想着再画布上输出,那样其码不会
有闪动,但是超连接应该不行的;
TO WebExplorer
肯定不行的;
 
webexplorer的方法可以实现
 
放一Panel中放一些Label或做连接的一些控件,
然后在定时器中改变 Panel 的Top属性。
若要循环滚动,自己完善一下。
 
呵呵,有趣,看样子,我要倒分了;
 
我做了一个有你所说的那样 8-)
在窗体中放入Image Timer 这两个控件 在加入以下代码就可以了
呵呵 8-) 很简单吧!Image控件要你自己去调节它的长短哦!
作者:qbtxx
多少我想你也要给点分吧!!! 呵呵
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
x,tt:integer;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
x:=x-1;
tt:=tt-1;
if x<-176 then
x:=image1.height+10;
tt:=x+10;
image1.Canvas.font.size:=16;
image1.Canvas.Font.Style:=[fsItalic];
image1.Canvas.Font.Color:=$00c080ff;
image1.Canvas.TextOut(10,x,'你');
image1.Canvas.Font.Color:=$00ff0080;
image1.Canvas.TextOut(10,x+20,'好');
image1.Canvas.Font.Color:=$00408080;
image1.Canvas.TextOut(10,x+40,'呀');
image1.Canvas.Font.Color:=$008080ff;
image1.Canvas.TextOut(10,x+60,'可');
image1.Canvas.Font.Color:=$00408000;
image1.Canvas.TextOut(10,x+80,'爱');
image1.Canvas.Font.Color:=$00400080;
image1.Canvas.TextOut(10,x+100,'的');
image1.Canvas.Font.Color:=$004080ff;
image1.Canvas.TextOut(10,x+120,'妹');
image1.Canvas.Font.Color:=$00c08000;
image1.Canvas.TextOut(10,x+140,'妹');
image1.Canvas.Font.Color:=ClPurple;
image1.Canvas.TextOut(10,x+160,'!');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
timer1.enabled:=true;
timer1.Interval:=10;
x:=image1.height+10;
tt:=x+10;
end;

end.
 
顶部