Recent

Author Topic: add a column to TshellListView?  (Read 21909 times)

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: add a column to TshellListView?
« Reply #15 on: April 05, 2015, 11:27:42 am »
Still leaves the possibility to do
Code: [Select]
  ShellListView1.Columns.Delete(0);

(If Columns were to be published.)

In this case don't publish them. No need to do so if AddColumn and DeleteColumn are used.
« Last Edit: April 05, 2015, 11:30:26 am by typo »

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: add a column to TshellListView?
« Reply #16 on: April 05, 2015, 11:31:08 am »
Does anybody know if Delphi publishes TShellListView.Columns?
If not, do they have a method of adding/deleting columns?
If yes, can you delete all columns?

While our implementation is far from D compatible, if we implement such a thing, we might try to follow (black box aproach) the Greek.

Bart

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: add a column to TshellListView?
« Reply #17 on: April 05, 2015, 01:55:19 pm »
I only found this in C++:

http://godcom.googlecode.com/svn/trunk/ShellControls/ShellCtrls.hpp

And it publics Columns.

Code: [Select]
public:
__fastcall virtual TCustomShellListView(Classes::TComponent* AOwner);
__fastcall virtual ~TCustomShellListView(void);
void __fastcall Back(void);
HIDESBASE void __fastcall Refresh(void);
TShellFolder* __fastcall SelectedFolder(void);
__property TShellFolder* Folders[int Index] = {read=GetFolder};
__property TShellFolder* RootFolder = {read=FRootFolder};
__property Items;
__property Columns;

I also found this unit, apparently from Delphi, and it does not public Columns.

https://github.com/Baltimore99/delphi-drag-drop/blob/master/Demos/DetailedDemo/Extra/ShellCtrls.pas
« Last Edit: April 05, 2015, 02:08:48 pm by typo »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: add a column to TshellListView?
« Reply #18 on: April 05, 2015, 04:06:50 pm »
Oh wow, it seems that from delphi 2009 onwards the tshellxxx controls are not part of the default installation and are now published on their sourceforge project as samples on how to create controls that interact with windows shell. http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE6/Object%20Pascal/VCL/ShellControls/


EDIT: sorry forgot that the columns seem to be public.
« Last Edit: April 05, 2015, 04:11:06 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: add a column to TshellListView?
« Reply #19 on: April 05, 2015, 04:23:27 pm »
Code: [Select]
public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Back;
    procedure Refresh;
    function SelectedFolder: TShellFolder;
    property Folders[Index: Integer]: TShellFolder read GetFolder;
    property RootFolder: TShellFolder read FRootFolder;
    property Items;
    property Columns;

Yes, thanks.

So, yes, Delphi publics Columns.
« Last Edit: April 05, 2015, 04:26:32 pm by typo »

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: add a column to TshellListView?
« Reply #20 on: April 05, 2015, 06:45:08 pm »
So, yes, Delphi publics Columns.

I made them public.

Bart

 

TinyPortal © 2005-2018