Вниз
Скачать: 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.978 c
1-1128396828
SHVictor
2005-10-04 07:33
2005.10.30
Редактирование поля в StringGrid


14-1128763750
Buss
2005-10-08 13:29
2005.10.30
Сайт


1-1128674267
Yozch1
2005-10-07 12:37
2005.10.30
Проблема с кодирование темы сообщения в idMessage


1-1128669787
Woolen
2005-10-07 11:23
2005.10.30
Access violation в TComboBox


1-1128058065
Luis Alberto (goblingaga)
2005-09-30 09:27
2005.10.30
Сохранить элементы TListView, вкючая SubItems




   Наверх