I have a custom Delphi component going down from TGraphicControl. Its class is declared as follows:
TMyLabel = class(TGraphicControl)
private
...
protected
...
public
...
published
property Height;
property Width write SetWidth;
...
end;
The implementation of SetWidth is as follows:
procedure TMyLabel.SetWidth(const Value: Integer);
begin
if (Value >= 0) and (Value <> Width)
then begin
inherited Width := Value;
// Do some other stuff
...
end;
MessageDlg('Test', mtInformation, [mbOK], 0);
end;
I am currently getting SetWidth when the width of a component changes programmatically at run time or at design time by entering a value in the corresponding field of the object inspector. However, when I resize the component during development with the mouse, the inspector field for the Width object updates, but the message box does not appear, so my SetWidth procedure is not called.
, SetWidth , Paint, , ( ). ?