TShellListView

From Lazarus wiki
Revision as of 14:32, 27 August 2013 by Paul King (talk | contribs) (Created page with "=TShellListView= ==Introduction== This documentation is not intended to be thorough, but it is enough to get a beginner started on the use of the object. Later on, there mig...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

TShellListView

Introduction

This documentation is not intended to be thorough, but it is enough to get a beginner started on the use of the object. Later on, there might be a more standardized treatment of this object. This particular discussion applies to MS-Windows, and particularly Windows 7. At any-rate, its functionality appears to be OS-Specific, and care must be taken when porting code using this object to another OS.

Managing TShellListView

TShellListView displays files according to its Root property. The Root property contains the whole path from the drive letter to the current directory. If using it to show the complete path including a selected file, then you need to append a slash ('\' or '/' in UNIX) to Root, as in:

pathname := '"' + SVList.Root + '\' + SVList.Selected.Caption + '"';

where SVList is the name of a TShellListView object, and SVList.Selected.Caption contains the name of a file selected by the user.