vterekh
asked on
TFont property
Hi
I create component with object property (in particular TFont):
TMyComp = class(TLabel)
private
FFont: TFont;
procedure SetFont(Value: TFont);
...........
published
property Font: TFont read FFont write SetFont;
end;
procedure SetFont(Value: TFont);
begin
FFont.Assign(Value);
end;
Matter-of-course I create and destroy FFont into constructor and destructor.
Using this component the method SetFont is fired when I peform the next:
......
MyComp.Font := Form1.Font;
......
But how can I make SetFont to be fired in case of:
......
MyComp.Font.Size := 72;
......
It sets MyComp.Font.Size to 72 but I need some others actions to be peformed on this event.
Tanks in advance.
Vasily.
I create component with object property (in particular TFont):
TMyComp = class(TLabel)
private
FFont: TFont;
procedure SetFont(Value: TFont);
...........
published
property Font: TFont read FFont write SetFont;
end;
procedure SetFont(Value: TFont);
begin
FFont.Assign(Value);
end;
Matter-of-course I create and destroy FFont into constructor and destructor.
Using this component the method SetFont is fired when I peform the next:
......
MyComp.Font := Form1.Font;
......
But how can I make SetFont to be fired in case of:
......
MyComp.Font.Size := 72;
......
It sets MyComp.Font.Size to 72 but I need some others actions to be peformed on this event.
Tanks in advance.
Vasily.
It is impossible
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
2 TOndrej
Thanks,
I've been trying to locate this in VCL but unfortunately I missed this technique.
Thanks,
I've been trying to locate this in VCL but unfortunately I missed this technique.
have a look at TCanvas for example