zoukankan      html  css  js  c++  java
  • 包含图形、动画、进度条等等的状态栏

    {
    在Delphi中,一个控件上能否成为其它控件的父控件取决于此控件的ControlStyle属性。
    ControlStyle属性是集合类型的,如果此集合包含csAcceptsControls元素,
    则它能接受其它控件;否则,它就不能成为其它控件的父控件。
    ControlStyle属性只能在控件的构造函数(Constructor)中指定,
    在程序运行时它是不能被改变的。所以如果希望窗口状态条上面能包含其它控件,
    我们只需要在继承类中重载TStatusBar控件的Constructor函数,
    并且让控件的集合属性ControlStyle中包含csAcceptsControls即可。
    }

    unit StatusBarEx;

    interface

    uses
     Windows, Messages, SysUtils, Classes, Graphics,
     Controls, Forms, Dialogs, ComCtrls;

    type
     TStatusBarEx = class(TStatusBar)
     public
       constructor Create(AOwner: TComponent); override;
     end;

    procedure Register;

    implementation

    constructor TStatusBarEx.Create(AOwner: TComponent);
    begin
     inherited Create(AOwner);
     {为了让TStatusBarEx控件能接受其它控件,必须
     使ControlStyle属性(集合类型)包含csAcceptsControls元素}
     ControlStyle:= ControlStyle + [csAcceptsControls];
    end;

    procedure Register;
    begin
     RegisterComponents('Win32', [TStatusBarEx]);
    end;

    end.

  • 相关阅读:
    Solidity通过合约转ERC20代币
    各种开源协议区别
    shell脚本之函数
    shell脚本之循环和循环控制
    shell脚本之if判断以及case多分支选择
    shell脚本之数组
    shell脚本之变量
    nginx常用内置变量
    nignx配置文件详解
    nginx源码安装./configure常见参数详解
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/2941052.html
Copyright © 2011-2022 走看看