Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Standard Controls/TScrollBar    [ Add a report in this area ]  
Report #:  105184   Status: Open
TScrollBar painted incorrectly when owning Form.DoubleBuffered = True w/Themes
Project:  Delphi Build #:  16.0.4429.46931
Version:    16.4 Submitted By:   Tor Erik Dahlsrud
Report Type:  Basic functionality failure Date Reported:  4/25/2012 2:55:35 PM
Severity:    Commonly encountered problem Last Updated: 4/30/2012 1:20:49 AM
Platform:    All versions Internal Tracking #:   27667
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 11
Description
Under Windows 7 and Aero themes enabled, TScrollBar could paint erroneously the contents of another component inside its client area - if its containing form's DoubleBuffered is True.

This is visible each time moving the mouse over the edges of the scrollbar, which of course happens quite often if the user moves the scrollbar.

This is very distracting and visually bad.

See Steps.
Steps to Reproduce:
On Windows 7 Ultimate 64-bit with XE2 Update 4
Aero themes must be enabled. For example 'Landscapes'.


1. File / New / VCL Forms Application - Delphi
2. Add a TPanel to the form and set its Color to clRed (do not change its size)
3. Add a TScrollbar to the form and move it away from the panel
4. Increase size of ScrollBar to bigger than the panel
5. Set the Form's DoubleBuffered property to True
6. Run

Observe that when moving the mouse over the Scrollbar's edges, the contents of the Panel is shown.

Expected behaviour is of course that the ScrollBar is painted normally.

This bug is triggered by Aero and DoubleBuffered = True on the form.
Note that it's important that the TPanel is added *before* the TScrollBar
This bug appear both in a 32-bits and a 64-bits exe.
Workarounds
Either

1) Set the Form's DoubleBuffered property to False
2) Disable Aero
3) Add the ScrollBar first
Attachment
QC105184.zip
Comments

Tomohiro Takahashi at 4/25/2012 7:53:52 PM -
Could you please attach sample project(including some screenshots) to reproduce/confirm your issue?

Tor Erik Dahlsrud at 4/26/2012 4:20:00 AM -
Added a test project.

Tomohiro Takahashi at 5/2/2012 7:31:41 PM -
This report was opened with valid Internal Tracking Number.
Thanks.

Boguslaw Kaleta at 12/4/2012 11:30:48 AM -
10 months - why there is no update / patch ?!?

Boguslaw Kaleta at 12/4/2012 11:31:54 AM -
My mistake (DD.MM / MM.DD) - 7 months.

Tomohiro Takahashi at 12/4/2012 4:40:09 PM -
Unfortunately, this issue is still Open.
So, please use your workaround(s)]for the time being...

Server Response from: ETNACODE01