- Code: Select all
unit TntFindDialog_Custom;
interface
uses
Windows, SysUtils, Classes, TntDialogs, StdCtrls, TntStdCtrls, Graphics, Dialogs, Controls;
type
TTntFindDialog_Custom = class(TTntFindDialog)
private
LanguagesCB: TTntComboBox;
{ Private declarations }
protected
{ Protected declarations }
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
constructor TTntFindDialog_Custom.Create(AOwner: TComponent);
begin
{if AOwner is TWinControl then
LanguagesCB := TTntComboBox.Create(AOwner)
else
LanguagesCB := TTntComboBox.Create(nil);}
inherited Create(AOwner);
LanguagesCB := TTntComboBox.Create(Self);
with LanguagesCB do
begin
SetSubComponent(True);
Name := 'cbLang';
Parent := TWinControl(Self);
// Parent := TWinControl(Self);
Left := 387;
Top := 225;
Width := 49;
Height := 23;
Hint := 'Select a range for the search';
Style := csDropDownList;
Font.Charset := DEFAULT_CHARSET;
Font.Color := clBlack;
Font.Height := -11;
Font.Name := 'Arial Unicode MS';
Font.Style := [];
ItemHeight := 15;
ParentFont := False;
TabOrder := 3;
Items.Add('All');
Items.Add('1');
Items.Add('2');
Items.Add('3');
Items.Add('4');
Items.Add('5');
Items.Add('6');
Items.Add('7');
end;
end; //Create
destructor TTntFindDialog_Custom.Destroy;
begin
inherited Destroy;
end;
procedure Register;
begin
RegisterComponents('Custom', [TTntFindDialog_Custom]);
end;
end.