The property setter for a property accepts only one parameter of the same type as the property. There is no syntax that allows you to write the type of code you are trying to write. Please note that I ignore array properties that are not relevant here.
What you need to do is write a special installer that provides an additional parameter to your SetMySend function.
procedure SetMySend(const Value: TTM_MySend_Profile; const displayValue: string); overload; procedure SetMySend(const Value: TTM_MySend_Profile); overload; property MySend: TTM_MySend_Profile read FMySend write SetMySend;
And then in the implementation you write
procedure TMyClass.SetMySend(const Value: TTM_MySend_Profile); begin SetMySend(Value, '...'); end;
You could grab index qualifiers to create something similar, but I would not recommend this.
source share