Главная страница
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.024 c
2-1128674268
Денис
2005-10-07 12:37
2005.10.30
Обратный результат.


1-1128676151
Суслик
2005-10-07 13:09
2005.10.30
Вопрос про интерфейсы


5-1107336978
khas
2005-02-02 12:36
2005.10.30
Добавление "детей" в DesignTime в свой компонент


6-1121204883
Atrion
2005-07-13 01:48
2005.10.30
Определить IP пользователей работающих с конкретным сервером


14-1128351667
ArtemESC
2005-10-03 19:01
2005.10.30
Windows