Hi!
This is a very simple demo component:
unit TestComponent;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Dialogs, StdCtrls;
type
TTestComponent = class(TCustomListBox)
protected
procedure Loaded; override;
end;
procedure Register;
implementation
procedure TTestComponent.Loaded;
begin
Inherited Loaded;
Items.Text:= 'TEST OKAY'; Invalidate;
end;
procedure Register;
begin
RegisterComponents('My Stuff',[TTestComponent]);
end;
end.
Well, If I drop this component to the form, the Loaded won't start as I see. This is normal?
If I running the project, Loaded is works. I know, I can use CreateWnd, but the question is the Loaded, because I see FileCtrl/TFileListBox component source, so this component override only the Loaded method, and files appear after TFileListBox component droped to the form, so I think Loaded is works... but how?
Thanks!