View Issue Details

IDProjectCategoryView StatusLast Update
0003926JEDI VCL00 JVCL Componentspublic2006-09-29 05:47
ReporterdhertzfeAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version3.20 
Target VersionFixed in Version 
Summary0003926: TJvListView OnCustomDrawItem Not Working
DescriptionOnly the first Column of the REPORT listing is paying attention to the code of within OnCustomDrawItem. The associated subitems are not. Within the standard Delphi TListView, the code is utilized by both the Item and Subitems.

If it was the intention of the development of TJvListView to have the programmer code both the onCustomDrawItem and onCustomDrawSubitem to accomplish the same performance of the Standard TListView, you have just created a nightmare for any legacy programs and hours of re-coding and virtually made the visual emphasis of designinated items with the ListView component useless for legacy code.
TagsNo tags attached.

Relationships

related to 0003932 resolvedobones JvListView: When the item brush is not used the font settings are ignored. 

Activities

2006-09-26 08:09

 

Example.zip (3,882 bytes)

obones

2006-09-26 09:32

administrator   ~0010188

Please try with the latest JVCL from here

http://jvcl.sf.net/daily/

dhertzfe

2006-09-26 11:27

reporter   ~0010190

The component will not complie. It has errors:
  TIntegerList - Undeclared Identifier
  TJvSize - Undeclared Identifier

obones

2006-09-26 11:46

administrator   ~0010191

Have you installed the whole package and the daily JCL ? it's all explained on the page...

dhertzfe

2006-09-26 14:11

reporter   ~0010193

Ok .... it works sorta, but three NEW bugs have been introduced into the component.

[1] It now displays correctly the font and canvas colors as expected.

NEW BUGS
==========
[1] All displays are in BOLD.
[2] If you resize the screen (normal to full size) within an MDI application, all the canvas attributes are are removed. You have to refresh the display of the ListView to the canvas attributes back. If you go from Full Size display to normal, the attributes remain.
[3] Resizing a screen within a MDI application causes the screen to flicker something fierce.


Regards,
Dale

dhertzfe

2006-09-26 20:53

reporter   ~0010194

This may be due to the fact that the component is locked into BOLD print, but if I assign fsItalic to the font style, it is ignored.

dhertzfe

2006-09-28 12:40

reporter   ~0010211

Is there a quick fix I can do myself in order to at least have the component to implement styles rather than being locked into fsBold?

Thanks

obones

2006-09-28 12:48

administrator   ~0010212

Have a look at the sources, try to find out why it does that and post a proposed fix. We are short on resources at the moment.

obones

2006-09-29 05:47

administrator   ~0010227

You should use TJvListItem instead of changing the canvas yourself.
Set back vsReport to true in ViewStylesItemBrush and make the code in your handler be like that:

var
  JvListItem: TJvListItem;
begin
  JvListItem := Item as TJvListItem;

      if JvListItem.Index mod 2 = 0 then
        JvListItem.Brush.Color := $00CEFFFF
      else
        JvListItem.Brush.Color := clMenuBar;

  if (JvListItem.SubItems[1] <> 'x') then
    begin
      JvListItem.Font.Color := clRed;
    end
  else
    begin
      JvListItem.Font.Color := clBlack;
    end;
end;

This works just fine here.
I have created a new issue to deal with the fact that it ignores the font settings when not using the item brush

Issue History

Date Modified Username Field Change
2006-09-26 08:09 dhertzfe New Issue
2006-09-26 08:09 dhertzfe File Added: Example.zip
2006-09-26 09:32 obones Note Added: 0010188
2006-09-26 09:32 obones Status new => feedback
2006-09-26 11:27 dhertzfe Note Added: 0010190
2006-09-26 11:46 obones Note Added: 0010191
2006-09-26 14:11 dhertzfe Note Added: 0010193
2006-09-26 20:53 dhertzfe Note Added: 0010194
2006-09-28 12:40 dhertzfe Note Added: 0010211
2006-09-28 12:48 obones Note Added: 0010212
2006-09-29 05:47 obones Note Added: 0010227
2006-09-29 05:47 obones Status feedback => resolved
2006-09-29 05:47 obones Resolution open => no change required
2006-09-29 05:47 obones Assigned To => obones
2006-09-29 05:49 obones Relationship added related to 0003932