[Lazarus] Anchor-Docking Bugs

Eugen Bolz info at eugen-bolz.de
Wed Jun 23 00:17:07 CEST 2010


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





More information about the Lazarus mailing list