View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004196 | JEDI VCL | 00 JVCL Components | public | 2007-08-07 05:50 | 2007-10-12 07:24 |
Reporter | SurFan4711 | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0004196: TJVListview crashes with "nil cannot be assigned to TFont" | ||||
Description | If you do not create the TJvListItems via the CreateEnh constructor, Font (and Brush) do not get created, so the above Exception is raised in TJvListView.CustomDrawItem | ||||
Additional Information | I suggest: 1.) Testing, if Item is derived from TJvListItem and 2.) Checking if Items Font and Brush properties are not nil. Here is my suggestion: function TJvListView.CustomDrawItem(Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; begin if (Stage = cdPrePaint) and Assigned(Item) and (Item is TJvListItem) then begin if TJvListItem(Item).Font <> nil then Canvas.Font := TJvListItem(Item).Font; if ViewStyle in ViewStylesItemBrush then if TJvListItem(Item).Brush <> nil then Canvas.Brush := TJvListItem(Item).Brush; Canvas.Handle; end; | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2007-08-07 05:50 | SurFan4711 | New Issue | |
2007-10-12 07:23 | obones | Status | new => resolved |
2007-10-12 07:23 | obones | Resolution | open => won't fix |
2007-10-12 07:23 | obones | Assigned To | => obones |
2007-10-12 07:23 | obones | Note Added: 0013926 |