View Issue Details

IDProjectCategoryView StatusLast Update
0024941LazarusLCLpublic2013-10-08 21:49
ReporterAndrey Zubarev Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0024941: TListView.onCustomDrawSubItem
DescriptionLCL&Win32 with customdraw TListView have youself to paint the background subitem, it is impossible to do the right thing (http://forum.lazarus.freepascal.org/index.php/topic,21921). In Delphi background is painted in VCL before to the call CustomDrawSubItem, to care about this unnecessary
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0007059 resolvedZeljan Rikalo TListView: OnCustomDraw event 

Activities

Zeljan Rikalo

2013-10-07 16:02

developer   ~0070617

Please attach example.

Zeljan Rikalo

2013-10-07 16:11

developer  

win32subitempaint.diff (586 bytes)   
Index: lcl/interfaces/win32/win32wscustomlistview.inc
===================================================================
--- lcl/interfaces/win32/win32wscustomlistview.inc	(revision 43157)
+++ lcl/interfaces/win32/win32wscustomlistview.inc	(working copy)
@@ -186,6 +186,7 @@
     begin
       // subitem 0 is handled by dtItem
       if DrawInfo^.iSubItem = 0 then Exit;
+      ALV.Canvas.FillRect(DrawInfo^.nmcd.rc);
       DrawResult := ALV.IntfCustomDraw(dtSubItem, Stage,
         DrawInfo^.nmcd.dwItemSpec, DrawInfo^.iSubItem,
         ConvState(DrawInfo^.nmcd.uItemState), nil);
win32subitempaint.diff (586 bytes)   

Zeljan Rikalo

2013-10-07 16:11

developer   ~0070619

Please test attached patch and see if that fixes issue.

Andrey Zubarev

2013-10-08 20:45

reporter   ~0070674

Unfortunately no, this patch is only drawn background for the SubItems with DefaultDraw:=true

Zeljan Rikalo

2013-10-08 20:53

developer   ~0070676

Please attach example which shows exact problem (I don't understand what's your exact point).

Andrey Zubarev

2013-10-08 21:44

reporter   ~0070679

I also stopped to understand something)) Since the bug report the situation has changed. I attach an example that I have is not working properly. do not draw the background for custom SubItems, some elements are sometimes not drawn.

Andrey Zubarev

2013-10-08 21:44

reporter  

bug3.zip (709,874 bytes)

Andrey Zubarev

2013-10-08 21:49

reporter   ~0070681

Inside there is an example of Lazarus source and Delphi source&exe - see how it works there

Issue History

Date Modified Username Field Change
2013-09-02 13:28 Andrey Zubarev New Issue
2013-10-07 14:25 Zeljan Rikalo Relationship added related to 0007059
2013-10-07 16:02 Zeljan Rikalo LazTarget => -
2013-10-07 16:02 Zeljan Rikalo Note Added: 0070617
2013-10-07 16:02 Zeljan Rikalo Assigned To => Zeljan Rikalo
2013-10-07 16:02 Zeljan Rikalo Status new => feedback
2013-10-07 16:11 Zeljan Rikalo File Added: win32subitempaint.diff
2013-10-07 16:11 Zeljan Rikalo Note Added: 0070619
2013-10-08 20:45 Andrey Zubarev Note Added: 0070674
2013-10-08 20:45 Andrey Zubarev Status feedback => assigned
2013-10-08 20:53 Zeljan Rikalo Note Added: 0070676
2013-10-08 20:53 Zeljan Rikalo Status assigned => feedback
2013-10-08 21:44 Andrey Zubarev Note Added: 0070679
2013-10-08 21:44 Andrey Zubarev Status feedback => assigned
2013-10-08 21:44 Andrey Zubarev File Added: bug3.zip
2013-10-08 21:49 Andrey Zubarev Note Added: 0070681