Recent

Author Topic: TScrollBox produces ugly artifacts when scrolling  (Read 266 times)

Superdisk

  • Jr. Member
  • **
  • Posts: 73
TScrollBox produces ugly artifacts when scrolling
« on: August 12, 2022, 03:45:59 am »
When I put an image in a TScrollBox and scroll around, it produces repainting artifacts. This effect is more pronounced on other controls like a custom-drawn one I have, but this demonstrates is more clearly.

Is there any way to prevent this from happening? MS Paint for instance doesn't have this problem.

You can view the gif here: https://nickfa.ro/images/Ugly.gif

The project file is here: https://nickfa.ro/images/ScrollBoxArtifacts.zip

jamie

  • Hero Member
  • *****
  • Posts: 4746
Re: TScrollBox produces ugly artifacts when scrolling
« Reply #1 on: August 13, 2022, 04:48:09 pm »
All I see it overlap due to the steps in the vertical control.

have you set the Scroll bars to smooth scrolling?



The only true wisdom is knowing you know nothing

Handoko

  • Hero Member
  • *****
  • Posts: 4712
  • My goal: build my own game engine using Lazarus
Re: TScrollBox produces ugly artifacts when scrolling
« Reply #2 on: August 13, 2022, 05:24:48 pm »
I downloaded and tested the code, it run ok on my Ubuntu Mate 22.04. Maybe the computer did not have correct VGA driver installed, or maybe virus/antivirus issue.

wp

  • Hero Member
  • *****
  • Posts: 10030
Re: TScrollBox produces ugly artifacts when scrolling
« Reply #3 on: August 13, 2022, 06:51:32 pm »
Scrolls perfectly on Windows 11 (at least it is my impression).
« Last Edit: August 13, 2022, 07:44:23 pm by wp »

 

TinyPortal © 2005-2018