[Lazarus] Store empty string property in *.lfm

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jun 22 17:28:20 CEST 2010


On Tue, 22 Jun 2010 13:58:44 +0200
theo <xpde at theo.ch> wrote:

> Hello
> 
> Is it possible to store an empty string property?
> 
> The property is getting a default value a creation time (GetUserDir),
> If the user enters an empty string to the obj. insp. it is shown as 
> empty but still has the value it got at creation time when run.
> 
> I've tried things like:
>  property Directory: string read FDirectory write SetDirectory stored 
> True nodefault;
> 
> but it doesn't work. Empty String is never stored it seems.
> 
> Am I missing sth.?

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

Mattias




More information about the Lazarus mailing list