title: Default property value of a component
body: <p>I wonder if it is possible to define a default property value to a component. <br>
  In another words, I want to set, in design time, an unique name (maybe GUID) to each TDBGrid in the system, is it possible? <br> There is another way to control uniqueness of a component that works both in runtime and design time. Also it must persists after I close delphi; e.g combobox list values. </p>
  
  <p>Thanks in advance!</p>
  
  <h2>edit</h2>
  
  <p>below is the code, that is not working:</p>
  
  <pre><code>type
    TMDBGrid = class(TDBGrid)
    private
      FUniqueName: String;
    protected
      function DefaultUniqueName: String;
      function GetUniqueName: String;
      procedure SetUniqueName(const AName: String);
    public
      constructor Create(AOwner: TComponent); override;
    published
      property UniqueName: String read GetUniqueName write SetUniqueName;
    end;
  
  procedure Register;
  
  implementation
  
  uses uComponentUtils;
  
  procedure Register;
  begin
    RegisterComponents('MLStandard', [TMDBGrid]);
  end;
  
  { TMDBGrid }
  
  constructor TMDBGrid.Create(AOwner: TComponent);
  begin
    inherited;
    FUniqueName := DefaultUniqueName;
  end;
  
  function TMDBGrid.DefaultUniqueName: String;
  begin
    Result := GenerateGUID(True);
  end;
  
  function TMDBGrid.GetUniqueName: String;
  begin
    Result := '';
  end;
  
  procedure TMDBGrid.SetUniqueName(const AName: String);
  begin
    FUniqueName := AName;
    if FUniqueName = '' then
      FUniqueName := DefaultUniqueName;
  end;
  
  function GenerateGUID(PlainText: Boolean = False): String;
  var G: TGUID;
  begin
    CreateGUID(G);
    Result:= GUIDToString(G);
    if PlainText then
      Result := MultiStringReplace(Result, ['{','}','[',']','-','.',' ','(',')'],
                                           ['','','','','','','','',''],
                                           [rfReplaceAll, rfIgnoreCase]);
  end;
  </code></pre>
  
  <p><strong>"It's not working"</strong> means when a TDBGrid is added to any form, UNIQUENAME is empty. It should have a GUID.</p>