Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.10.30;
Скачать: CL | DM;

Вниз

Прорисовка "детей"   Найти похожие ветки 

 
slart ©   (2005-01-17 19:43) [0]

Как сделать, чтобы "дети" сразу прорисовывались? я делаю так:

unit SLPanel;

interface

uses
 SysUtils, Classes, Controls, ExtCtrls,StdCtrls;
var GroupBox:TGroupBox;
   Button:Tbutton;
type
 tSLPanel = class(TPanel)
 private

   { Private declarations }
 protected
   { Protected declarations }
 public
   { Public declarations }
 published
   { Published declarations }
   constructor Create(aowner:Tcomponent);override; //Êîíñòðóêòîð
 end;

procedure Register;

implementation

procedure Register;
begin
 RegisterComponents("SLComponent", [tSLPanel]);
end;

constructor TSlPanel.Create(aowner:Tcomponent);
begin
inherited create(Aowner);
GroupBox:=TGroupBox.Create(Self);
Button:=Tbutton.Create(Self);

end;          

end.


 
Юрий Зотов ©   (2005-01-18 05:25) [1]

GroupBox.Parent := Self;
Button.Parent := Self; // Или Button.Parent := GroupBox;

Переменные GroupBox и Button должны быть полями класса TSLPanel. Иначе - что произойдет, если положить на форму несколько таких компонентов?



Страницы: 1 вся ветка

Текущий архив: 2005.10.30;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.061 c
14-1128802429
Bogdan1024
2005-10-09 00:13
2005.10.30
дизайн программы под ВинХП


14-1128514686
IceBeerg
2005-10-05 16:18
2005.10.30
NOD32 - Win32/TrojanDownloader.Dadobra.EE


3-1127147351
olevacho_
2005-09-19 20:29
2005.10.30
Доступ к локальным БД без BDE


10-1106204689
Vlash
2005-01-20 10:04
2005.10.30
Блокирование клиента


4-1125244172
LiqS
2005-08-28 19:49
2005.10.30
CopyFileEx