View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004878 | JEDI VCL | 00 JVCL Components | public | 2009-07-30 09:31 | 2009-09-22 16:58 |
Reporter | Brian | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0004878: JvListview OnCustomDrawSubItem treats item.caption as a subitem | ||||
Description | When you use oncustomdrawsubitem to change the font of subitems, the item captions are treated like they were also subitems. Check screenshot for comparison (ListView on top, JvListView below) http://img124.imageshack.us/img124/7900/20090730092736capture.png | ||||
Additional Information | procedure TForm7.JvListView1CustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean); begin if (SubItem=1) then begin Sender.Canvas.Font.Color := clRed; end else sender.Canvas.Font.Color := clBlue; defaultdraw := true; end; | ||||
Tags | No tags attached. | ||||
|
Please provide the zipped sources of a sample application showing this. |
2009-08-26 22:20
|
listview test.zip (3,335 bytes) |
|
added zip |
|
This is as designed, OnCustomDrawSubItem is called even for SubItem 0 because of Mantis 3908. See the JvListView file for an explanation at line 2108. So you should change your code to this: if (SubItem=1) then Sender.Canvas.Font.Color := clRed else if (SubItem=2) then sender.Canvas.Font.Color := clBlue; |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-07-30 09:31 | Brian | New Issue | |
2009-08-03 11:35 | obones | Note Added: 0015899 | |
2009-08-03 11:35 | obones | Status | new => feedback |
2009-08-26 22:20 | Brian | File Added: listview test.zip | |
2009-08-26 22:20 | Brian | Note Added: 0016020 | |
2009-09-22 16:58 | obones | Note Added: 0016146 | |
2009-09-22 16:58 | obones | Status | feedback => resolved |
2009-09-22 16:58 | obones | Resolution | open => no change required |
2009-09-22 16:58 | obones | Assigned To | => obones |