View Issue Details

IDProjectCategoryView StatusLast Update
0028275LazarusLCLpublic2015-06-12 23:44
ReporterDerit Agustin Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Platformwin32OSWindows 
Product Version1.5 (SVN) 
Summary0028275: incorrect painting listbox
Descriptionhi i found incorrect painting listbox
TagsNo tags attached.
Fixed in Revisionr49321
LazTarget-
Widgetset
Attached Files

Relationships

related to 0028146 closedJuha Manninen Flicker in TListbox 

Activities

Derit Agustin

2015-06-11 12:32

reporter  

2015-07-11 17_29_11-Form1.png (10,853 bytes)   
2015-07-11 17_29_11-Form1.png (10,853 bytes)   

wp

2015-06-11 12:37

developer   ~0084365

Is this an owner-drawn listbox? You have to call Listbox.Canvas.FillRect before painting the text.

Juha Manninen

2015-06-11 17:57

developer   ~0084367

Last edited: 2015-06-12 11:06

View 2 revisions

If wp's solution does not solve the issue, an example project and a proper explanation of the problem is needed.

Derit Agustin

2015-06-12 02:04

reporter  

sample.zip (128,551 bytes)

Derit Agustin

2015-06-12 02:34

reporter   ~0084375

i need somebody test this bug in windows
i clean and revert all change and open sample project bugs not solve :(

wp

2015-06-12 09:40

developer   ~0084383

The demo runs fine (Win 7, Win XP). No idea what the problem is - the demo is just a standard listbox with some text items attached. As Juha said you must describe exactly what is wrong.

Derit Agustin

2015-06-12 11:30

reporter   ~0084389

@wp what -rev your lazarus used ?

wp

2015-06-12 15:48

developer   ~0084403

You are right - I had Laz 1.4, but after installation of trunk on the XP virtual machine, I see the painting issues as well (but not on Win 7). They are due to a recent bug fix to prevent flicker (issue 0028146). Since this flickering effect is difficult to detect, and since XP usage will be less and less important, I think it is legitimate to bypass the recent modification by a version check. See attached patch.

wp

2015-06-12 15:53

developer  

win32wsstdctrls.pp.patch (830 bytes)   
Index: interfaces/win32/win32wsstdctrls.pp
===================================================================
--- interfaces/win32/win32wsstdctrls.pp	(revision 49311)
+++ interfaces/win32/win32wsstdctrls.pp	(working copy)
@@ -613,8 +613,11 @@
         Exit(DeliverMessage(WindowInfo^.WinControl, LMessage));
       end;
     WM_ERASEBKGND:
-      // Avoid unnecessary background paints to avoid flickering of the listbox
+      if WindowsVersion <= wvXP then   // Standardbehavior for XP
+        Result := CallDefaultWindowProc(Window, Msg, WParam, LParam)
+      else
       begin
+        // Avoid unnecessary background paints to avoid flickering of the listbox
         WindowInfo := GetWin32WindowInfo(Window);
         Count := SendMessage(Window, LB_GETCOUNT, 0, 0);
         if Assigned(WindowInfo^.WinControl) and
win32wsstdctrls.pp.patch (830 bytes)   

Derit Agustin

2015-06-12 17:40

reporter   ~0084411

solved thanks

wp

2015-06-12 18:29

developer   ~0084416

Thanks for testing. Somebody should apply the patch, I don't have commit rights here.

Juha Manninen

2015-06-12 23:44

developer   ~0084428

Applied, thanks.

Issue History

Date Modified Username Field Change
2015-06-11 12:32 Derit Agustin New Issue
2015-06-11 12:32 Derit Agustin File Added: 2015-07-11 17_29_11-Form1.png
2015-06-11 12:37 wp Note Added: 0084365
2015-06-11 16:24 Maxim Ganetsky Project Patches => Lazarus
2015-06-11 17:57 Juha Manninen Note Added: 0084367
2015-06-12 02:04 Derit Agustin File Added: sample.zip
2015-06-12 02:34 Derit Agustin Note Added: 0084375
2015-06-12 09:40 wp Note Added: 0084383
2015-06-12 11:06 Juha Manninen Note Edited: 0084367 View Revisions
2015-06-12 11:30 Derit Agustin Note Added: 0084389
2015-06-12 15:48 wp Note Added: 0084403
2015-06-12 15:48 wp File Added: win32wsstdctrls.pp.patch
2015-06-12 15:49 wp Relationship added related to 0028146
2015-06-12 15:53 wp File Deleted: win32wsstdctrls.pp.patch
2015-06-12 15:53 wp File Added: win32wsstdctrls.pp.patch
2015-06-12 17:40 Derit Agustin Note Added: 0084411
2015-06-12 18:29 wp Note Added: 0084416
2015-06-12 23:15 Juha Manninen Assigned To => Juha Manninen
2015-06-12 23:15 Juha Manninen Status new => assigned
2015-06-12 23:44 Juha Manninen Fixed in Revision => r49321
2015-06-12 23:44 Juha Manninen LazTarget => -
2015-06-12 23:44 Juha Manninen Note Added: 0084428
2015-06-12 23:44 Juha Manninen Status assigned => resolved
2015-06-12 23:44 Juha Manninen Resolution open => fixed