title: How to draw a colored border around Edit field using TShape?
body: <p>I try to draw a colored border around TEdit field using TShape. I define the following component:</p>
  
  <pre><code>type TGEdit = class(TEdit)
    private
      m_shape : TShape;
    protected
      procedure setBorderColor( brd_col : TColor );
      procedure setBorderWidth( brd_wid : integer );
    public
      constructor create(AOwner : TComponent); override;
      destructor  destroy(); override;
    published
      property borderColor : TColor read m_border_color write setBorderColor default clBlack;
      property borderWidth : integer read m_border_width write setBorderWidth default 1;
  end;
  </code></pre>
  
  <p>Define a TShape object in constructor.</p>
  
  <pre><code>constructor TGEdit.create(AOwner : TComponent);
  begin
    inherited;
    Self.BorderStyle:= bsNone;
    m_border_color  := clBlack;
    m_border_width  := 1;
    m_shape         := TShape.Create(AOwner);
    m_shape.Parent  := Self.Parent;
    m_shape.Shape   := stRectangle;
    m_shape.Width   := Self.Width+2*m_border_width;
    m_shape.Height  := Self.Height+2*m_border_width;
    m_shape.Left    := Self.Left-m_border_width;
    m_shape.Top     := self.Top-m_border_width;
    m_shape.Brush.Style := bsClear;
    m_shape.Pen.Color   := m_border_color;
    m_shape.Pen.Style   := psSolid;
  end;
  
  destructor TGNumberEdit.destroy();
  begin
    m_shape.Free();
    inherited;
  end;
  </code></pre>
  
  <p>Define a procedures to change border's color and width</p>
  
  <pre><code>procedure TGEdit.setBorderColor( brd_col : TColor );
  begin
    if m_border_color = brd_col then
      exit;
    m_border_color    := brd_col;
    m_shape.Pen.Color := m_border_color;
  end;
  
  procedure TGEdit.setBorderWidth( brd_wid : integer );
  begin
    if (m_border_width = brd_wid) or (brd_wid &lt; 0) then
      exit;
    m_border_width    := brd_wid;
    m_shape.Pen.Width := m_border_width;
  end;
  </code></pre>
  
  <p>But when I put component on form the Shape doesn't drawn. Where is an error in my code?</p>