anchor.diff:  procedure TfpgBaseEdit.PasteFromClipboard;
   begin
     DoPaste;
  +end;
  +
  +{ TfpgBaseTextEdit }
  +
  +procedure TfpgBaseTextEdit.HandlePaint;
  +var
  +  r: TfpgRect;
  +begin
  +  inherited HandlePaint;
  +  r := Canvas.GetClipRect;    // contains adjusted size based on borders
  +
  +  if (FVisibleText = '') and not Focused then
  +  begin
  +    Canvas.SetTextColor(clShadow1);
  +    fpgStyle.DrawString(Canvas, -FDrawOffset + GetMarginAdjustment, r.Top + FHeightMargin, FHint, Enabled);
  +  end
  +  else
  +  begin
  +    Canvas.SetTextColor(FTextColor);
  +    fpgStyle.DrawString(Canvas, -FDrawOffset + GetMarginAdjustment, r.Top + FHeightMargin, FVisibleText, Enabled);
  +  end;
  +
  +  if Focused then
  +  begin
  +    // drawing selection
  +    if FSelOffset <> 0 then
  +      DrawSelection;
  +
  +    // drawing cursor
  +    fpgCaret.SetCaret(Canvas, FCursorPx, r.Top + FHeightMargin, fpgCaret.Width, FFont.Height);
  +  end
  +  else
  +  begin
  +    // drawing selection
  +    if (AutoSelect = False) and (FSelOffset <> 0) and (HideSelection = False) then
  +      DrawSelection;
  +    fpgCaret.UnSetCaret(Canvas);
  +  end;
  +
   end;
   
   { TfpgBaseNumericEdit }
  
positive.code: var
    x: TfpgCoord;
    r: TfpgRect;
  
    // paint selection rectangle
    procedure DrawSelection;
    var
      lcolor: TfpgColor;
      rs: TfpgRect;
    begin
      if Focused then
      begin
        lcolor := clSelection;
        Canvas.SetTextColor(clSelectionText);
      end
      else
      begin
        lcolor := clInactiveSel;
        Canvas.SetTextColor(clText1);
      end;
  
      rs.SetRect(FVisSelStartPx, r.Top + FHeightMargin, FVisSelEndPx - FVisSelStartPx, FFont.Height);
      Canvas.SetColor(lcolor);
      Canvas.FillRectangle(rs);
      Canvas.SetTextColor(clWhite);
      Canvas.AddClipRect(rs);
      fpgStyle.DrawString(Canvas, -FDrawOffset - FSideMargin, r.Top + FHeightMargin, FVisibleText, Enabled);
      Canvas.ClearClipRect;
    end;
  
  begin
    if Alignment = taRightJustify then
    begin
      inherited HandlePaint;
      r := GetClientRect;
      Canvas.SetClipRect(r);
      Canvas.Clear(BackgroundColor);
      Canvas.SetFont(Font);
      Canvas.SetTextColor(TextColor);
      x := r.Width - Font.TextWidth(Text) - FSideMargin;
      Canvas.DrawString(x,r.Top + FHeightMargin,Text);
      if Focused then
      begin
        // drawing selection
  
negative.code:   end;
  
  
    TfpgBaseTextEdit = class(TfpgBaseEdit)
    protected
      procedure   HandlePaint; override;
    end;
  
  
    TfpgEdit = class(TfpgBaseTextEdit)
    public
      property    PopupMenu;  // UI Designer doesn't fully support it yet
    published
  