Home > Back-end >  Tedit inherited component
Tedit inherited component

Time:10-05

 
Type
TEditEx=class (TEdit)
Private
M_Ver: string;

Protected
Public
The constructor Create (Owner: TComponent); The phrase "; Virtual;
The property MyVer: string read m_Ver;
Published
end;


 
Constructor TEditEx. Create (Owner: TComponent);
The begin
Inherited the Create (the Owner);//initialize the inherited part of the

Text:='test';
M_Ver:='1.0';
end;


Is can be created dynamically in code, but drag components to have no effect on the interface, how is this to return a responsibility excuse me?

CodePudding user response:

There is no effect

CodePudding user response:

To do inherit control from TCustomEdit inheritance is better,

CodePudding user response:

refer to the second floor lhylhy response:
do inherit control from TCustomEdit better inheritance,


Try from TCustomEdit inheritance, but not the same

CodePudding user response:

reference 1st floor sololie response:
no effect


Not just a simple test, because the test so I didn't write complete

CodePudding user response:

 
The constructor Create (Owner: TComponent); The phrase "; Virtual;
//to
The constructor Create (Owner: TComponent); Override.

CodePudding user response:

The constructor Create (Owner: TComponent); The phrase "; Virtual;
//to
The constructor Create (Owner: TComponent); Override.

CodePudding user response:

reference cyy201 reply: 3/f
Quote: refer to the second floor lhylhy response:

To do inherit control from TCustomEdit better inheritance,


Try from TCustomEdit inheritance, but not as

Inheritance over to deal with a lot of things,

CodePudding user response:

What's the meaning of the effect of don't know what you said
  • Related