Вставить ProgressBar в StatusBar
Falk0ner, вс, 06/07/2008 - 15:34.
Вставить ProgressBar в StatusBar
procedure TForm1.FormCreate(Sender: TObject);
begin
with ProgressBar1 do
begin
Parent := StatusBar1;
Position := 100;
:= 2;
Left := 0;
Height := StatusBar1.Height - ;
Width := StatusBar1.Panels[0].Width - Left;
end;
end;
begin
with ProgressBar1 do
begin
Parent := StatusBar1;
Position := 100;
:= 2;
Left := 0;
Height := StatusBar1.Height - ;
Width := StatusBar1.Panels[0].Width - Left;
end;
end;
http://delphiworld.narod.ru/ DelphiWorld 6.0 pgProgress положить на форму как Visible := false; StatusPanel надо OwnerDraw сделать и pефpешить, если Position меняется.
procedure TMainForm.stStatusBarDrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
begin
if Panel.index = pnProgress then
begin
pgProgress.BoundsRect := Rect;
pgProgress.PaintTo(stStatusBar.Canvas.Handle, Rect.Left, Rect.);
end;
end;
Panel: TStatusPanel; const Rect: TRect);
begin
if Panel.index = pnProgress then
begin
pgProgress.BoundsRect := Rect;
pgProgress.PaintTo(stStatusBar.Canvas.Handle, Rect.Left, Rect.);
end;
end;
http://delphiworld.narod.ru/ DelphiWorld 6.0
Отправить комментарий