View Issue Details

IDProjectCategoryView StatusLast Update
0027786LazarusLCLpublic2015-04-05 18:39
ReporterAntônio GalvãoAssigned ToBart Broersma 
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version1.4 
Summary0027786: Make property Columns on TShellListView public (ShellCtrls unit)
DescriptionSee the source:

 TShellListView = class(TCustomShellListView)
    { TCustomListView properties
      The same as TListView excluding data properties }
    property Align;
    property Anchors;
    property BorderSpacing;
    property BorderStyle;
    property BorderWidth;
// property Checkboxes;
    property Color default clWindow;
// property Columns;

Simply uncomment that line.
TagsNo tags attached.
Fixed in Revisionr48635
Attached Files


Bart Broersma

2015-04-05 00:36

developer   ~0082602

Last edited: 2015-04-05 00:36

View 2 revisions

If you need access to the columns property then you should derive a TShellListView descendant that exposes this.
The reason it is not exposed is that the common programmer should not be able to delete colums. The listview is intended to have 3, and messing with the amount (especially when deleting some) is just ugly.

John Kozikopoulos

2015-04-05 01:55

reporter   ~0082605

1)A library should not enforce any notion of beauty or ugliness it should be able to follow the times.

2)"Is just ugly" is not a valid reason to refuse a usability enhancement.

3)If you must enforce your own view crippling the library in the process then I suggest you do it the smart way and create a new column class that will not be able to be deleted or removed by the end user.

Bart Broersma

2015-04-05 11:08

developer   ~0082610

While I agree with the notion that a better solution might be to block tempering with the first 3 columns, the tone of your 3rd remark is unneeded.

Please be aware that we (developers and contributors) are all volunteers, dedicating their spare time to this project. None of us get paid.
There is no need to insult us.

If you have a suggestion as to how to implement this (allowing access to Columns, yet in the mean time preserving the first 3 ones) then please by all means share these thoughts with us.

Bart Broersma

2015-04-05 11:09

developer   ~0082611

Question: is Columns pubished in Delphi's TShellListView?

John Kozikopoulos

2015-04-05 16:48

reporter   ~0082627

Last edited: 2015-04-05 16:49

View 2 revisions

I have not implied anything for the developers of the project I genuinely think that introducing blockades in a library to server anything outside the libraries scope is equivalent with crippling the library.

I can think of 2 ways to enforce that some columns are not destroyed by the end user.
1) introduce a private variable, (set it to true for the first 3 columns) if the var is true allow to delete or free the library only from the units finalization section.
2) create a new TColumn class based on the old one and change the columns to raise an exception when the user tries to free/delete them.

I'll repeat my self here, I strongly think that is wrong to do so, the end user should be able to decide if a piece of information is to be shown in the list or not and not to be forced in a hopeless situation where he does not want to show it and can't hide it for some reason or worst have it invisible eating memory.

Antônio Galvão

2015-04-05 16:53

reporter   ~0082628

> Question: is Columns pubished in Delphi's TShellListView?

Answer: Yes, it is public. See here:

Antônio Galvão

2015-04-05 17:00

reporter   ~0082629

Last edited: 2015-04-05 17:29

View 3 revisions

@John Kozikopoulos

> the end user should be able to decide if a piece of information is to be shown in the list

I agree with you. A very "ugly" solution, indeed, to block the access.

My suggestion is to have methods which intermediate Columns access, for example AddColumn and DeleteColumn.

Antônio Galvão

2015-04-05 18:13

reporter   ~0082631

Last edited: 2015-04-05 18:14

View 2 revisions


In fact, maintaining blockded the Columns property seems to be simply a hasty (or a preliminary) solution and I can not see any "reason" behind this.

Bart Broersma

2015-04-05 18:19

developer   ~0082632

OK, public it shall be.
This would make AddColumn/DeleteColumn redundant?

Antônio Galvão

2015-04-05 18:20

reporter   ~0082633


Bart Broersma

2015-04-05 18:32

developer   ~0082634

Please close if OK.

Antônio Galvão

2015-04-05 18:39

reporter   ~0082636


Issue History

Date Modified Username Field Change
2015-04-05 00:17 Antônio Galvão New Issue
2015-04-05 00:36 Bart Broersma Note Added: 0082602
2015-04-05 00:36 Bart Broersma Note Edited: 0082602 View Revisions
2015-04-05 01:55 John Kozikopoulos Note Added: 0082605
2015-04-05 11:08 Bart Broersma Note Added: 0082610
2015-04-05 11:09 Bart Broersma Note Added: 0082611
2015-04-05 16:48 John Kozikopoulos Note Added: 0082627
2015-04-05 16:49 John Kozikopoulos Note Edited: 0082627 View Revisions
2015-04-05 16:53 Antônio Galvão Note Added: 0082628
2015-04-05 17:00 Antônio Galvão Note Added: 0082629
2015-04-05 17:20 Antônio Galvão Note Edited: 0082629 View Revisions
2015-04-05 17:29 Antônio Galvão Note Edited: 0082629 View Revisions
2015-04-05 18:13 Antônio Galvão Note Added: 0082631
2015-04-05 18:14 Antônio Galvão Note Edited: 0082631 View Revisions
2015-04-05 18:19 Bart Broersma Note Added: 0082632
2015-04-05 18:19 Bart Broersma Assigned To => Bart Broersma
2015-04-05 18:19 Bart Broersma Status new => assigned
2015-04-05 18:20 Antônio Galvão Note Added: 0082633
2015-04-05 18:32 Bart Broersma Fixed in Revision => r48635
2015-04-05 18:32 Bart Broersma LazTarget => 1.4
2015-04-05 18:32 Bart Broersma Note Added: 0082634
2015-04-05 18:32 Bart Broersma Status assigned => resolved
2015-04-05 18:32 Bart Broersma Fixed in Version => 1.4
2015-04-05 18:32 Bart Broersma Resolution open => fixed
2015-04-05 18:39 Antônio Galvão Note Added: 0082636
2015-04-05 18:39 Antônio Galvão Status resolved => closed