动态生成:
ProgressBar := TProgressBar.Create(self);
ProgressBar.Parent := StausBar;

解决方案 »

  1.   

    用1stClass的fcStatusBar可以,自己编程可以设置style为psOwnerDraw,在onDrawPanel事件中把一个ProgressBar画进来
      

  2.   

    hirec还有简单的方法吗?
      

  3.   

    这个D6的控件可以办到,我自己写的,要不就用第三方的,eg:ALComp
    from http://www.alphalink.com.au/~leigh/andy/index.html
    还是下面我写的够简单
    unit StatusBarEx;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics,
      Controls, Forms, Dialogs, ComCtrls, DesignIntf;type
      TStatusBarEx = class(TStatusBar)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
        constructor Create(AOwner: TComponent); override;
      published
        { Published declarations }
      end;procedure Register;implementationconstructor TStatusBarEx.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      ControlStyle:= ControlStyle + [csAcceptsControls];
    end;procedure Register;
    begin
      RegisterComponents('Samples', [TStatusBarEx]);
    end;end.