Вниз
Скачать: 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.01 c
3-87332
vasilly
2003-02-10 23:19
2003.02.27
Как заставить TStoredProc получить список параметров? BDE


1-87434
Извращенец2
2003-02-18 15:58
2003.02.27
Блокировка окна программы


3-87342
hacker
2003-02-10 21:15
2003.02.27
HTML в базе данных


1-87544
smok_er
2003-02-15 15:47
2003.02.27
Работа c TFileStream


14-87653
nick-from
2003-02-10 23:01
2003.02.27
PC Activity Monitor 4.0 pro Crack




   Наверх