Thanks for your answer Matthias

String properties always have as default value the empty string.
But you can define a stored procedure.
See the TControl.Caption property.



I don't get what you mean. There I read:

property Caption: TCaption read GetText write SetText stored IsCaptionStored; where afaics "IsCaptionStored" determines whether or not to store the Caption value.
But I simply want it always stored, even when empty.

Since it doesn't seem to work with empty string, I use a workaround which does the job for me:

procedure TThumbControl.SetDirectory(const AValue: UTF8String);
begin
 if AValue='' then fDirectory:='none' else fDirectory := AValue;
 if (fDirectory <> 'none') and (fDirectory <> '') then
    if DirectoryExistsUTF8(AValue) then
    begin


Thank you
Best regards
Theo


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to