I want to create a search box for my application. The search box will include two things: a search filed and a search button. I think, the right thing to do would be to put those two components in a group box which will serve as a container to hold them inside. I figured that I needed to create a class derived from the TGroupBox class which upon creation will receive a table name as a parameter to search in. The two components, the search box and the button, are going to be its children - and those are the basic principles how it will be working.
This picture illustrates what the search box will look like:

Here's what I've done so far:
unit clsTSearchBox;
interface
uses Classes, SysUtils, StdCtrls, Dialogs, ADODB, DataModule;
type
TSearchBox = class (TGroupBox)
constructor CreateNew(AOwner: TObject; Dummy: Integer);
end;
implementation
constructor TSearchBox.CreateNew(AOwner: TObject; Dummy: Integer);
begin
inherited;
Self.Height := 200;
Self.Width := 400;
Self.Caption := 'Test:'
end;
end.
As you can see, not much. I just created a class that I derived from the TGroupBox class. Please, help me write proper code to instantiate that search box component on my form because I don't really know how to do that. I only need code for proper object creation.
Thank you all in advance.
Custom Containers Pack. If it would work on D7 - you just make a regular form with groupbox, edit and button, and then compile it into new componentGExpertsandCnWizardshave component-to-code actions. Drop any component onto the form, then run that action and you would have creation code for it. Learn it and do the same with your component if you like it.