View Issue Details

IDProjectCategoryView StatusLast Update
0012534LazarusLCLpublic2009-03-18 14:21
ReporterJosé Mejuto Assigned ToVincent Snijders  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version0.9.27 (SVN) 
Summary0012534: Listview does not correctly set properties
DescriptionThe following line:

        if (LV_STYLES[Prop].StyleType = lsStyle) = (Prop in AProps)

is wrong, if a property is not in "AProps" and "StyleType" is not "lsStyle" the condition becomes inverted to the expected (condition met as false=false).

Visual effect in ListView is that the IconView will not wrap the long text lines and they are written ones over the others.
Additional InformationProposed fix:

        if (LV_STYLES[Prop].StyleType = lsStyle) and (Prop in AProps)

*Note the "and" instead "=".
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetWin32/Win64
Attached Files

Relationships

child of 0012533 closedFelipe Monteiro de Carvalho Listview autosize does not work. 

Activities

José Mejuto

2008-10-31 01:55

reporter   ~0023052

Sorry, I forget to write the affected file: "lcl\interfaces\win32\win32wscustomlistview.inc" around line 793 (my tests messed a bit the line counter). The function is ".Setproperties".

Vincent Snijders

2008-11-03 12:57

manager   ~0023114

I think the code is correct.

If the property is set then the Style flags must be or'ed with the properties style flag, otherwise the corresponding style flag must be cleared (assuming the StyleType is lsStyle). For properties with StyleType is lsInvert, the reverse is true: if the property is set, the Style Flag must be cleared and if the property is not set the Style Flag must be set.

For setting lvpWrapText, it must clear the LVS_NOLABELWRAP flag.
 if (LV_STYLES[Prop].StyleType = lsStyle) = (Prop in AProps)
becomes
 if (false=true) then
and the clearing code is chosen.

Vincent Snijders

2008-11-03 13:19

manager   ~0023115

The problem (but that is a different problem) is that there is no TListView property which sets lvpWrapText property and the default is false. If you know what Delphi property sets it, then we can add it to the listview otherwise we need to make up a name for ourselves. In any case, create a new bug report for the missing property.

Issue History

Date Modified Username Field Change
2008-10-31 01:51 José Mejuto New Issue
2008-10-31 01:51 José Mejuto Widgetset => Win32
2008-10-31 01:55 José Mejuto Note Added: 0023052
2008-11-02 22:17 Vincent Snijders Status new => assigned
2008-11-02 22:17 Vincent Snijders Assigned To => Vincent Snijders
2008-11-03 12:57 Vincent Snijders Note Added: 0023114
2008-11-03 13:19 Vincent Snijders Status assigned => resolved
2008-11-03 13:19 Vincent Snijders Resolution open => no change required
2008-11-03 13:19 Vincent Snijders Note Added: 0023115
2008-12-07 21:35 Vincent Snijders Relationship added child of 0012533
2009-03-18 14:21 José Mejuto Status resolved => closed