Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.04 c
5-1105351198
Siargey
2005-01-10 12:59
2005.10.30
Создание редактора свойств


2-1128778852
Виталий09
2005-10-08 17:40
2005.10.30
Как получить информацию из файла с инета


4-1119593490
uny
2005-06-24 10:11
2005.10.30
Как выключить винчестер? программно.


14-1128802429
Bogdan1024
2005-10-09 00:13
2005.10.30
дизайн программы под ВинХП


3-1125875699
ASVShade
2005-09-05 03:14
2005.10.30
Запрос не объединение таблиц




   Наверх