View Issue Details

IDProjectCategoryView StatusLast Update
0027315LazarusLCLpublic2015-01-18 19:29
ReporterKrzysztof Dibowski Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSKubuntu 
Product Version1.2.6 
Summary0027315: TListView - Custom draw item and issue with selected item
DescriptionHi,

I want to have different font color in custom item. In normal state code is working but when select item then seems that selection is drawed after text draw so text is not showing.
I could use OwnerDraw := True and OnDrawItem event instead but then I need to draw everything (background, selection, etc...)
Note that list view is OwnerData
Steps To Reproduce1. Run attached demo
2. Select random item
Additional InformationLazarus 1.2.6 (but tested also on svn version)
FPC 2.6.4
Kubuntu 14.04 64 bit, Qt widgetset
TagsNo tags attached.
Fixed in Revision47413,47414
LazTarget-
WidgetsetQT
Attached Files

Activities

Krzysztof Dibowski

2015-01-15 20:53

reporter  

customdrawselected.zip (2,344 bytes)

Krzysztof Dibowski

2015-01-15 20:57

reporter  

screenshot.png (45,013 bytes)   
screenshot.png (45,013 bytes)   

Zeljan Rikalo

2015-01-17 12:14

developer   ~0080465

It's pretty complicated to explain, but it's not easy to fix under qt widgetset. Use DefaultDraw := False; inside your function and it will be ok.

Zeljan Rikalo

2015-01-18 11:10

developer   ~0080480

Or better to say: I have solution for this issue, but still it does not fix all issues around OnCustomDraw, OnAdvancedDraw etc ...

Zeljan Rikalo

2015-01-18 16:53

developer   ~0080489

Please test and close if ok.

Zeljan Rikalo

2015-01-18 17:01

developer   ~0080490

Must change TListView with ViewStyle <> vsReport too.

Zeljan Rikalo

2015-01-18 17:02

developer   ~0080491

Now you can test and close if ok.

Krzysztof Dibowski

2015-01-18 18:59

reporter   ~0080500

Great! Did you tested it also on Gtk and Windows? Same behavior? I'll need this on other widgetsets soon too.

Zeljan Rikalo

2015-01-18 19:19

developer   ~0080501

We'll, do I look like Casper The Friendly Ghost ?

Krzysztof Dibowski

2015-01-18 19:29

reporter   ~0080502

Never know ;) . This question did not have sound like selfish, just wondering if bug fixes are also tested on other platforms. Working perfect on Qt. Thanks

Krzysztof Dibowski

2015-01-18 19:29

reporter   ~0080503

Fixed. Thanks!

Issue History

Date Modified Username Field Change
2015-01-15 20:53 Krzysztof Dibowski New Issue
2015-01-15 20:53 Krzysztof Dibowski File Added: customdrawselected.zip
2015-01-15 20:57 Krzysztof Dibowski File Added: screenshot.png
2015-01-16 09:01 Zeljan Rikalo Assigned To => Zeljan Rikalo
2015-01-16 09:01 Zeljan Rikalo Status new => assigned
2015-01-17 12:14 Zeljan Rikalo Note Added: 0080465
2015-01-18 11:10 Zeljan Rikalo Note Added: 0080480
2015-01-18 16:53 Zeljan Rikalo Fixed in Revision => 47413
2015-01-18 16:53 Zeljan Rikalo LazTarget => -
2015-01-18 16:53 Zeljan Rikalo Note Added: 0080489
2015-01-18 16:53 Zeljan Rikalo Status assigned => resolved
2015-01-18 16:53 Zeljan Rikalo Resolution open => fixed
2015-01-18 17:01 Zeljan Rikalo Note Added: 0080490
2015-01-18 17:01 Zeljan Rikalo Status resolved => confirmed
2015-01-18 17:02 Zeljan Rikalo Fixed in Revision 47413 => 47413,47414
2015-01-18 17:02 Zeljan Rikalo Note Added: 0080491
2015-01-18 17:02 Zeljan Rikalo Status confirmed => resolved
2015-01-18 18:59 Krzysztof Dibowski Note Added: 0080500
2015-01-18 19:19 Zeljan Rikalo Note Added: 0080501
2015-01-18 19:29 Krzysztof Dibowski Note Added: 0080502
2015-01-18 19:29 Krzysztof Dibowski Note Added: 0080503
2015-01-18 19:29 Krzysztof Dibowski Status resolved => closed