F
flyea917
Unregistered / Unconfirmed
GUEST, unregistred user!
以下是代码
TMvExcelTools = class(TComponent)
private
FList: TList;
FDataSource: TDataSource;
FTitle: string;
FTitleFont: TFont;
FTitleColor: TColor;
FAutoSize: Boolean;
FFileName: string;
FDataBec: Integer;
FOnNextRecord: TNotifyEvent;
function GetDataSet: TDataSet;
protected
function GetCount: Integer;
function GetField(Index: Integer): TExField;
procedure SetField(Index: Integer; Value: TExField);
procedure SetFieldIndex(Field: TExField; Value: Integer);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Add(Field: TExField);
procedure NewField;
procedure Clear;
function FindField(const FieldName: string): TExField;
function FieldByName(const FieldName: string): TExField;
function IndexOf(Field: TExField): Integer;
procedure Remove(Field: TExField);
property Count: Integer read GetCount;
property DataSet: TDataSet read GetDataSet;
property Fields[Index: Integer]: TExField read GetField write SetField;
function Execute: Boolean;
published
property Title: string read FTitle write FTitle;
property TitleFont: TFont read FTitleFont write FTitleFont;
property TitleColor: TColor read FTitleColor write FTitleColor;
property AutoSize: Boolean read FAutoSize write FAutoSize;
property FileName: string read FFileName write FFileName;
property DataBec: Integer read FDataBec write FDataBec default 2;
property DataSource: TDataSource read FDataSource write FDataSource;
property OnNextRecord: TNotifyEvent read FOnNextRecord write FOnNextRecord;
end;
procedure register;
implementation
procedure register;
begin
RegisterComponents('Other', [TMvExcelTools]);
end;
综上,注册也写上去了
安装组件的时候也有提示安装成功,但没有提示注册了哪些组件,在Delphi的组件面板上也没有显示...
本人初学组件开发,请各位大虾提点一下...
急等.....
TMvExcelTools = class(TComponent)
private
FList: TList;
FDataSource: TDataSource;
FTitle: string;
FTitleFont: TFont;
FTitleColor: TColor;
FAutoSize: Boolean;
FFileName: string;
FDataBec: Integer;
FOnNextRecord: TNotifyEvent;
function GetDataSet: TDataSet;
protected
function GetCount: Integer;
function GetField(Index: Integer): TExField;
procedure SetField(Index: Integer; Value: TExField);
procedure SetFieldIndex(Field: TExField; Value: Integer);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Add(Field: TExField);
procedure NewField;
procedure Clear;
function FindField(const FieldName: string): TExField;
function FieldByName(const FieldName: string): TExField;
function IndexOf(Field: TExField): Integer;
procedure Remove(Field: TExField);
property Count: Integer read GetCount;
property DataSet: TDataSet read GetDataSet;
property Fields[Index: Integer]: TExField read GetField write SetField;
function Execute: Boolean;
published
property Title: string read FTitle write FTitle;
property TitleFont: TFont read FTitleFont write FTitleFont;
property TitleColor: TColor read FTitleColor write FTitleColor;
property AutoSize: Boolean read FAutoSize write FAutoSize;
property FileName: string read FFileName write FFileName;
property DataBec: Integer read FDataBec write FDataBec default 2;
property DataSource: TDataSource read FDataSource write FDataSource;
property OnNextRecord: TNotifyEvent read FOnNextRecord write FOnNextRecord;
end;
procedure register;
implementation
procedure register;
begin
RegisterComponents('Other', [TMvExcelTools]);
end;
综上,注册也写上去了
安装组件的时候也有提示安装成功,但没有提示注册了哪些组件,在Delphi的组件面板上也没有显示...
本人初学组件开发,请各位大虾提点一下...
急等.....