Форум: "Основная";
Текущий архив: 2003.02.27;
Скачать: [xml.tar.bz2];
Вниз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 вся ветка
Форум: "Основная";
Текущий архив: 2003.02.27;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.008 c