Мониторинг обменных курсов валют
18c0693f

Класс TPropertyEditor


Прежде, чем писать свой собственный Редактор Свойств, нужно разобраться в базовом классе TPropertyEditor: TPropertyEditor = class private FDesigner: TFormDesigner; FPropList: PInstPropList; FPropCount: Integer; constructor Create(ADesigner: TFormDesigner; APropCount: Integer); function GetPrivateDirectory: string; procedure SetPropEntry(Index: Integer; AInstance: TComponent; APropInfo: PPropInfo); protected function GetPropInfo: PPropInfo; function GetFloatValue: Extended; function GetFloatValueAt(Index: Integer): Extended; function GetMethodValue: TMethod; function GetMethodValueAt(Index: Integer): TMethod; function GetOrdValue: Longint; function GetOrdValueAt(Index: Integer): Longint; function GetStrValue: string; function GetStrValueAt(Index: Integer): string; procedure Modified; procedure SetFloatValue(Value: Extended); procedure SetMethodValue(const Value: TMethod); procedure SetOrdValue(Value: Longint); procedure SetStrValue(const Value: string); public destructor Destroy; override; procedure Activate; virtual; function AllEqual: Boolean; virtual; procedure Edit; virtual; function GetAttributes: TPropertyAttributes; virtual; function GetComponent(Index: Integer): TComponent; function GetEditLimit: Integer; virtual; function GetName: string; virtual; procedure GetProperties(Proc: TGetPropEditProc);virtual; function GetPropType: PTypeInfo; function GetValue: string; virtual; procedure GetValues(Proc: TGetStrProc); virtual; procedure Initialize; virtual; procedure SetValue(const Value: string); virtual; property Designer: TFormDesigner read FDesigner; property PrivateDirectory: string read GetPrivateDirectory; property PropCount: Integer read FPropCount; property Value: string read GetValue write SetValue; end;

Методы, приведенные ниже, можно переопределять (override) для изменения поведения Редактора свойств. ( "SetXxxValue" используется для представления одного из методов SetFloatValue, SetMethodValue, SetOrdValue или SetStrValue. "GetXxxValue" обозначает GetFloatValue, GetMethodValue, GetOrdValue или GetStrValue)

Свойства и методы полезные при создании нового класса Редактора свойств:






Самый выгодный курс обмена валюты