View Issue Details

IDProjectCategoryView StatusLast Update
0005006JEDI VCL00 JVCL Componentspublic2010-03-09 12:19
ReportertetarddAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionno change required 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005006: Add an OnDrawItem, OnDrawSubItem event where the Canvas is a param
DescriptionIf I want to customise the drawing of items by simply changing the font style or color, it's a pity that I have to rewrite a full drawing code in the OnCustomDrawItem and OnCustomDrawSubItem events.

It would be nice to have, similarly to what is done in TdfsExtListView (see TdfsExt ListView v.3.72 at http://www.torry.net/pages.php?id=144), an OnDrawItem and OnDrawSubItem that are defined that way:

procedure TForm1.ExtListView1DrawSubItem(Control: TWinControl; var ACanvas: TCanvas; Index, SubItem: Integer; ARect: TRect; State: TOwnerDrawState;
  var DefaultDrawing: Boolean);

This way, we can simply do:

Begin
     aCanvas.Font.Style := [fsItalic];
     DefaultDrawing := True;
End;

and we are in business.
TagsNo tags attached.

Activities

tetardd

2009-11-04 20:46

reporter   ~0016855

Sorry, silly me. I'm talking about the TJvListView control.

tetardd

2009-11-04 20:52

reporter   ~0016856

Actually, doing a bit more search, I found this:
http://www.delphidabbler.com/articles?article=16
that seems to indicate it can be done in the existing OnCustomDraw events as easily. This post is probably redundant then.

obones

2009-12-04 14:43

administrator   ~0016931

Well, if it's redundant, please let us know.
If not, please try to provide the implementation

obones

2010-03-09 12:19

administrator   ~0017286

I believe this was redundant

Issue History

Date Modified Username Field Change
2009-11-04 20:45 tetardd New Issue
2009-11-04 20:46 tetardd Note Added: 0016855
2009-11-04 20:52 tetardd Note Added: 0016856
2009-12-04 14:43 obones Note Added: 0016931
2009-12-04 14:43 obones Status new => feedback
2010-03-09 12:19 obones Note Added: 0017286
2010-03-09 12:19 obones Status feedback => resolved
2010-03-09 12:19 obones Resolution open => no change required
2010-03-09 12:19 obones Assigned To => obones