您的位置:首页 > 家居用品 > 家纺 > TProgressBar-Position

TProgressBar-Position

luyued 发布于 2011-02-06 07:54   浏览 N 次  

procedure TForm6.FormCreate(Sender: TObject);

begin

Memo1.AlignWithMargins:=True;

Memo1.Align:=alTop;

Memo1.Lines.LoadFromFile('f:\test.txt');

ProgressBar1.Min:=0;

ProgressBar1.Max:=Memo1.Width;

ProgressBar2.Min:=0;

ProgressBar2.Max:=Memo1.Height;

end;

procedure TForm6.Memo1MouseMove(Sender: TObject; Shift: TShiftState; X,

Y: Integer);

begin

Self.Text:=Format('X:%d;Y:%d',[X,Y]); //Memo中的鼠标坐标

ProgressBar1.Position:=X;

ProgressBar2.Position:=Y;

end;

图文资讯
广告赞助商