anchor.diff:    end;
   end;
   
  +procedure TfpgBaseTextEdit.SetRightEdge(const AValue: Boolean);
  +begin
  +  if FRightEdge <> AValue then
  +  begin
  +    FRightEdge := AValue;
  +    Invalidate;
  +  end;
  +end;
  +
  +procedure TfpgBaseTextEdit.SetRightEdgeCol(const AValue: Integer);
  +var
  +  v: Integer;
  +begin
  +  v := AValue;
  +  if v < 20 then v := 20;
  +  if v > 160 then v := 160;
  +  if FRightEdgeCol <> v then
  +  begin
  +    FRightEdgeCol := v;
  +    if FRightEdge then
  +      Invalidate;
  +  end;
  +end;
  +
   procedure TfpgBaseTextEdit.HandlePaint;
   begin
   //  inherited HandlePaint;
  
positive.code: constructor TfpgBaseTextEdit.Create(AOwner: TComponent);
  begin
    inherited Create(AOwner);
    Focusable   := True;
    FFont       := fpgGetFont('#Edit1');
    Width       := 320;
    Height      := 240;
    FLines      := TStringList.Create;
    CaretPos.x  := 0;
    CaretPos.y  := 0;
    FTopLine    := 0;
    FTabWidth   := 8;
    FMaxScrollH := 0;
    VPos        := 0;
    HPos        := 0;
    FTracking   := True;
    FFullRedraw := False;
    FSelected   := False;
  
    FVScrollBar          := TfpgScrollBar.Create(self);
    FVScrollBar.Orientation := orVertical;
  
negative.code:   Y := 0;
    cntVis := 1;
    GetSelBounds(StartNo, EndNo, StartOffs, EndOffs);
  
    // Draw right edge line first, so text can draw over it.
    if FRightEdge then
    begin
      if not FGutterPan.Visible then
      begin
        with Canvas do
        begin
          Canvas.Color := clShadow1; // FEnvironment.RightEdgeColor;
          Canvas.DrawLine((FRightEdgeCol * FChrW) - (HPos * FChrW), GetClientRect.Top, (FRightEdgeCol * FChrW) - (HPos * FChrW), GetClientRect.Height);
        end;
      end else
        with Canvas do
        begin
          Canvas.Color := clShadow1; // FEnvironment.RightEdgeColor;
          Canvas.DrawLine((FRightEdgeCol * FChrW) - (HPos * FChrW) + FGutterPan.Width, GetClientRect.Top, (FRightEdgeCol * FChrW) - (HPos * FChrW) + FGutterPan.Width, GetClientRect.Height);
        end;
    end;
  
    // Draw lines of text
    for I := FTopLine to FTopLine + FVisLines do
    begin
      DrawLine(I, Y);
  