![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Компоненты во время работы [D6, D7, Win95/98, Win2k, WinXP]
stas_a © (2002-11-28 13:09:00)Здрасть есть код
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
compon:array[1..2] of tComponent;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
compon[1]:=Tmemo.Create(Self);
With compon[1] do
begin
top := 200;
Left := 50;
Width:=200;
Height:=200;
Text := "proverka";
end;
end;
end.
Форма с кнопкой.
При нажатии у меня форма становится 200 на 200 сверху 200 слева 50 а Memo не создаётся вообще помогите плииз.
stas_a (2002-11-28 13:14:00) [1]Спасибо буду пробовать.
MBo (2002-11-28 13:12:00) [2]нужно еще
1) назначить Parent
2) with (compon[1] as TMemo) do ...