Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.09.09;
Скачать: CL | DM;

Вниз

Динамическое добавление контрола   Найти похожие ветки 

 
White Barsik   (2007-08-17 10:24) [0]

простой вопрос который поставил меня в тупик. Как динамически на форму добавить контрол? Кнопку, мемо и пр. То есть есть глобалный экземпляр объекта типа вышеперечисленных и как их привязать к форме, панели и тд.?


 
Вася Правильный   (2007-08-17 10:37) [1]

x:=TButton.Create(Form1);
x.Parent:=Form1;
x.top:=10;
x.left:=10;


 
Anatoly Podgoretsky ©   (2007-08-17 10:42) [2]

> White Barsik  (17.08.2007 10:24:00)  [0]

Applications should not need to call InsertControl directly. Child controls are automatically inserted and removed when added or deleted at design time. At runtime, use the Parent property of the child control to insert it in the Controls array. If the child control is already the child of another control, setting the Parent property ensures that the child is removed from the Controls of the original parent.

Так же и убираешь.


 
KSergey ©   (2007-08-17 12:22) [3]

http://www.delphikingdom.com/asp/viewitem.asp?catalogID=342


 
White Barsik   (2007-08-20 09:16) [4]

Моя благодарность всем...



Страницы: 1 вся ветка

Текущий архив: 2007.09.09;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.023 c
15-1186904367
ctudent
2007-08-12 11:39
2007.09.09
В чём может быть причина с DVD?


15-1187122325
AntiUser
2007-08-15 00:12
2007.09.09
Есть ли различия?


3-1178640142
Empleado
2007-05-08 20:02
2007.09.09
А никто не использует TSQLMonitor (SqlExpr.pas)?


15-1186596042
PEdee
2007-08-08 22:00
2007.09.09
Особенность компиляции в visual studio 2005


15-1186748515
Slider007
2007-08-10 16:21
2007.09.09
С днем рождения ! 10 августа 2007 пятница