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

Вниз

Подгрузка DFM   Найти похожие ветки 

 
Ш-К   (2005-09-06 15:09) [0]

У меня есть созданная форма. К этой форме я храню отдельно какой-то новый DFM. Разумеется, объекты "родного" DFM и DFM нового совпадают. Разница только в установленных свойствах.
Как проинициировать в рантайм новый DFM для созданной формы.


 
Ш-К   (2005-09-06 15:29) [1]

Если короче.
Есть форма:

object Form1: TForm1
 Left = 351
 Top = 109
 Width = 696
 Height = 800
 Caption = "Form1"
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = "MS Sans Serif"
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
end

Надо в рантайм установить св-ва из DFM:

object Form1: TForm1
 Left = 264
 Top = 147
 Width = 381
 Height = 244
 Caption = "OtherCaption"
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = "MS Sans Serif"
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
end


 
GLFox ©   (2005-09-06 15:35) [2]

Можно поробовать воспользоваться методом TObject.FieldAddress:
function FieldAddress(const Name: ShortString): Pointer;

Который позволяет access a specified published field of an object. FieldAddress returns a pointer to the field if it exists. If the object has no published field by that name, FieldAddress returns nil (Delphi) or NULL (C++).



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

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

Наверх




Память: 0.47 MB
Время: 0.057 c
1-1126524470
joisy
2005-09-12 15:27
2005.10.02
TwebBowser access to frames and web-page loading time


14-1125997277
Udaff
2005-09-06 13:01
2005.10.02
Электронные книги


1-1126437466
Igor_thief
2005-09-11 15:17
2005.10.02
RAVE reports


5-1100848833
Lisii
2004-11-19 10:20
2005.10.02
Таймер в компоненте


1-1126031771
Дмитрий_05
2005-09-06 22:36
2005.10.02
Создать кнопку TabbedNotebook