diff options
-rw-r--r-- | prototypes/textedit/fpg_textedit.pas | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/prototypes/textedit/fpg_textedit.pas b/prototypes/textedit/fpg_textedit.pas index 4cbaa996..0adfb821 100644 --- a/prototypes/textedit/fpg_textedit.pas +++ b/prototypes/textedit/fpg_textedit.pas @@ -460,6 +460,8 @@ begin if FLines.Count > 0 then FVScrollBar.SliderSize := FVisLines / FLines.Count; FVScrollBar.Visible := FLines.Count > FVisLines; + if FVScrollBar.Visible then + FVScrollBar.RepaintSlider; FHScrollBar.Min := 0; FHScrollBar.PageSize := FVisCols div 2; //FMaxScrollH div 4; @@ -467,8 +469,11 @@ begin FHScrollBar.Position := HPos; FHScrollBar.SliderSize := FVisCols / FMaxScrollH; FHScrollBar.Visible := FMaxScrollH > FVisCols; + if FHScrollBar.Visible then + FHScrollBar.RepaintSlider; -// UpdateScrollBarCoords; + UpdateScrollBarCoords; + UpdateCharBounds; end; procedure TfpgBaseTextEdit.VScrollBarMove(Sender: TObject; position: integer); @@ -522,7 +527,7 @@ var begin OldPos := VPos; VPos := p; - UpdateScrollBars; + {$IFDEF gDEBUG} writeln('OldPos:', OldPos, ' NewPos:', VPos, ' SB.Max:', FVScrollBar.Max); {$ENDIF} @@ -556,7 +561,7 @@ var begin OldPos := HPos; HPos := p; - UpdateScrollBars; + {$IFDEF gDEBUG} writeln('OldPos:', OldPos, ' NewPos:', HPos, ' SB.Max:', FHScrollBar.Max); {$ENDIF} @@ -588,11 +593,6 @@ begin VHeight := r.Height; HWidth := r.Width; - //if FVScrollBar.Visible then - //Dec(HWidth, FVScrollBar.Width); - //if FHScrollBar.Visible then - //Dec(VHeight, FHScrollBar.Height); - FHScrollBar.Top := Height - FHScrollBar.Height - r.Top; FHScrollBar.Left := r.Top; FHScrollBar.Width := HWidth; |