Recent

Author Topic: TTrackBar flickering  (Read 2117 times)

fcu

  • Jr. Member
  • **
  • Posts: 75
TTrackBar flickering
« on: January 19, 2022, 05:41:56 pm »
Hi
i've found that TtrackBar is the only component that still flickering while resizing the form , and all the components are rendered ok , so are there any workaround for this visual glitch

i am using lazarus 2.2 o, windows7 32bits

dsiders

  • Hero Member
  • *****
  • Posts: 634
Re: TTrackBar flickering
« Reply #1 on: January 19, 2022, 06:46:45 pm »
Hi
i've found that TtrackBar is the only component that still flickering while resizing the form , and all the components are rendered ok , so are there any workaround for this visual glitch

i am using lazarus 2.2 o, windows7 32bits

The flickering is not present using Lazarus 2.2.0 or 2.3.0 (git main) on Windows 8.1.
Lazarus 2.0.12, 2.2.0, 2.3.0 (Git) / FPC 3.2.0, 3.2.2, 3.3.1 / x86 64-bit / Windows 8.1
Preview Lazarus 2.3.0 documentation at: https://dsiders.gitlab.io/lazdocsnext

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: TTrackBar flickering
« Reply #2 on: January 19, 2022, 07:15:39 pm »
I can not confirm on Win 11 (Laz/main), but I do see the issue on Win 7. It can be fixed for me by adding the csParentBackground to the trackbar's ControlStyle:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   Trackbar1.ControlStyle := Trackbar1.ControlStyle + [csParentbackground];
  4. end;
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

fcu

  • Jr. Member
  • **
  • Posts: 75
Re: TTrackBar flickering
« Reply #3 on: January 19, 2022, 07:59:11 pm »
I can not confirm on Win 11 (Laz/main), but I do see the issue on Win 7. It can be fixed for me by adding the csParentBackground to the trackbar's ControlStyle:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   Trackbar1.ControlStyle := Trackbar1.ControlStyle + [csParentbackground];
  4. end;

thanks wp , it works
i hope this would added to lazarus source code

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1967
  • Former Delphi 1-7, 10.2 user
Re: TTrackBar flickering
« Reply #4 on: January 19, 2022, 11:49:17 pm »
i hope this would added to lazarus source code

In that case you will need to lodge an issue in the bugtracker.
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

 

TinyPortal © 2005-2018