title: How to make a TFont property show as default in the Object Inspector?
body: <p><strong>Overview</strong></p>
  
  <p>When writing components I like to give my published properties a default value, by doing this the Object Inspector displays any newly changed properties in Bold which of course is very useful to anyone using the component as they can easily identify between default and modified values.</p>
  
  <p><strong>Example</strong></p>
  
  <p>Here is an example of a component containing two Color and two Font properties:</p>
  
  <p>I am making the published properties <code>default</code> inside the class structure:</p>
  
  <pre><code>type
    TMyComponent = class(TComponent)
    private
      FColor: TColor;
      FColorTo: TColor;
      FFont: TFont;
      FFontHot: TFont;
      procedure SetColor(const Value: TColor);
      procedure SetColorTo(const Value: TColor);
      procedure SetFont(const Value: TFont);
      procedure SetFontHot(const Value: TFont);
    public
      constructor Create(AOwner: TComponent); override;
      destructor Destroy; override;
    published
      property Color: TColor read FColor write SetColor default clGreen;
      property ColorTo: TColor read FColorTo write SetColorTo default clBlue;
      property Font: TFont read FFont write SetFont; //&lt; set default?
      property FontHot: TFont read FFontHot write SetFontHot; //&lt; set default?
    end;
  </code></pre>
  
  <p>and the constructor:</p>
  
  <pre><code>constructor TMyComponent.Create(AOwner: TComponent);
  begin
    inherited Create(AOwner);
  
    FColor := clGreen;
    FColorTo := clBlue;
  
    FFont := TFont.Create;
    FFont.Color := clRed;
    FFont.Name := 'Segoe UI';
    FFont.Size := 10;
    FFont.Style := [];
  
    FFontHot:= TFont.Create;
    FFontHot.Color := clNavy;
    FFontHot.Name := 'Verdana';
    FFontHot.Size := 8;
    FFontHot.Style := [fsItalic];
  end;
  
  destructor TMyComponent.Destroy;
  begin
    FFont.Free;
    FFontHot.Free;
  
    inherited Destroy;
  end;
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>The problem I have is how to make a published Font property be "marked" as default?</p>
  
  <p>When I add the component to the Form both the TFont properties in the Object Inspector are in Bold (non-default). If I click the ellipse next to each published font I can see the values I set from the constructor show up - but again they are in Bold. Oddly enough though, the Size value for each font is never shown in Bold (ie appears unchanged).</p>
  
  <p>Standard published properties can be made <code>default</code> very easily, but how can you do this with classes like TFont that has sub-properties?</p>
  
  <p>I cannot see a way of setting the default values from the class structure, only in the constructor. Even if I could define the default values from the class structure (which seems impossible) I doubt it would work because the font has not been created yet. For example (which obviously does not work):</p>
  
  <pre><code>published
    property FontHot: TFont read FFontHot write SetFontHot default FFontHot.Color := clRed; //&lt; set default?
  </code></pre>
  
  <p>So, how can I make a published TFont property show as default and unchanged when adding the new component to the Object Inspector?</p>
  
  <p>I guess the same would apply to other classes similar to TFont which as sub-properties.</p>