anchor.diff:      Canvas.SetTextColor(TextColor);
       x := r.Width - Font.TextWidth(Text) - FSideMargin;
       fpgStyle.DrawString(Canvas, x, r.Top + FHeightMargin, Text, Enabled);
  +
       if Focused then
       begin
         // drawing selection
         if FSelOffset <> 0 then
           DrawSelection;
  -      fpgCaret.SetCaret(Canvas, FCursorPx, r.Top + FHeightMargin, fpgCaret.Width, Font.Height);
  +      // 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;
   end;
  
positive.code:     FSelOffset := 0;
  end;
  
  function TfpgBaseEdit.GetDrawText: string;
  begin
    if not PassWordMode then
  
negative.code:       DrawSelection;
      fpgCaret.UnSetCaret(Canvas);
    end;
  end;
  
  constructor TfpgBaseTextEdit.Create(AOwner: TComponent);
  