title: Drawing on the canvas of a TCornerButton is getting the position wrong
body: <p>I have created a new component that inherits from TCornerButton to add a drop down menu option.</p>
  
  <p>First question...</p>
  
  <p>Why do I need to override the "AfterPaint" method rather then the "Paint" method as described in the documentation. Overriding the "Paint" did nor result in any drawing.</p>
  
  <p>Second question...</p>
  
  <p>When I do use the "AfterPaint" method to draw a little down pointing arrow its offset right by about 5 pixels until the button gets focus. Just hovering over the button does not appear to fix the problem (as you would expect a repaint to occur). I have tied this with and without the "ScalePoint" in the code and every time its wrong. 
  It also shows in the wrong position at design time. As soon as the button is gets focus at runtime the arrow moves to the expected position. When it looses focus it moves back to the wrong position.
  FYI. The "Width" is not changing - I have tested for that.</p>
  
  <pre><code>procedure TLFButton.AfterPaint;
  var
    down_arrow: TPolygon;
    x, y: Extended;
  begin
    inherited;
    if FDropDownButton then
    begin
      Canvas.Fill := TText(FindStyleResource('text')).Fill;
      x := Width - 12;
      y := (Height / 2) - 3;
      SetLength(down_arrow, 3);
      down_arrow[0] := ScalePoint(PointF(x, y), Scale.X, Scale.Y);
      down_arrow[1] := ScalePoint(PointF(x+8,y), Scale.X, Scale.Y);
      down_arrow[2] := ScalePoint(PointF(x+4,y+6), Scale.X, Scale.Y);
      Canvas.FillPolygon(down_arrow, 255);
    end;
  end;
  </code></pre>