Вниз
Скачать: CL | DM;

HasProperty ???   Найти похожие ветки 

← →
Serghei   (2003-02-17 15:26) [0]

как узнать есть определенный Property некой компоненте в Ран-тайме
типа If TControl(...) HasProperty("***") then...


← →
Игорь Шевченко ©   (2003-02-17 15:29) [1]

Например:
var
propInfo: PPropInfo;
thisFont: TFont;
begin
Result := 0;

propInfo := GetPropInfo(AControl.ClassInfo, "Font");

if propInfo <> nil then begin
thisFont := TFont(GetObjectProp(AControl, "Font"));

if Assigned(thisFont) then
with TControlCanvas.Create do
try
Control := AControl;
Font.Assign(thisFont);
Result := TextWidth(AText);
finally
Free;
end;
end;


← →
Silver_   (2003-02-17 15:42) [2]

Игорь Шевченко ©

Пасиба по Хелпу искал не там. Еще раз сенькс.


← →
Юрий Зотов ©   (2003-02-17 22:21) [3]

Начиная с D5 в TypInfo есть готовая функция IsPublishedProp.



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

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
6-87599
_sMile
2003-01-10 13:22
2003.02.27
Как _быстро_ отправлять письма с аттачами по SMTP-протоколу?


14-87661
Hoper
2003-02-04 01:21
2003.02.27
hlp


1-87377
sl888
2003-02-17 16:20
2003.02.27
ColorBox в RGB


3-87316
Alexandr N
2003-02-10 11:25
2003.02.27
реиндексация


1-87546
Tolyan
2003-02-17 10:38
2003.02.27
Stack overflow




   Наверх