base_combobox.~pas

来自「用Delhpi和mapx开发的警务管理系统」· ~PAS 代码 · 共 51 行

~PAS
51
字号
unit Base_ComboBox;

interface

uses
  SysUtils, Classes, Controls, StdCtrls;

type
  TBase_ComboBox = class(TComboBox)
  private
    { Private declarations }
    inItemsValue:TStrings;//Items的实际值
    m_Text:string;
  protected
    { Protected declarations }
  public
    { Public declarations }
    constructor Create(AOwner:TComponent);override;
    destructor Destroy;override;
  published
    { Published declarations }
    property itemsvalue:TStrings read initemsvalue write initemsvalue;
    property  Text:string read m_Text write m_Text;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Base_Controls', [TBase_ComboBox]);
end;

constructor TBase_ComboBox.Create(AOwner:TComponent);
begin
  //
  inherited Create(Aowner);
  Text:=''; 
  inItemsValue:=TStringList.Create;
end;

destructor TBase_ComboBox.Destroy;
begin

  inItemsValue.Free;
  inherited destroy;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?