Вниз
Скачать: 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.026 c
4-1125244172
LiqS
2005-08-28 19:49
2005.10.30
CopyFileEx


3-1126793407
erika
2005-09-15 18:10
2005.10.30
генератор через IBquery


14-1128520916
NailMan
2005-10-05 18:01
2005.10.30
Сканер штрих-кодов: подключить!


14-1128433707
oldman
2005-10-04 17:48
2005.10.30
Интересное наблюдение (провокационные ветки)


9-1118591031
germany
2005-06-12 19:43
2005.10.30
Помогите с установкай GlScene




   Наверх