⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsfileexplorer27.txt

📁 TLsDirComboBox 及 TLsFileListView 是类似资源管理器 ( File Explorer ) 式样的加强版 TComboBox 构件
💻 TXT
📖 第 1 页 / 共 2 页
字号:

Unit LsFileExplorer27.pas

==============================================================================
Archive    :- FileExpl.zip

Components :- TLsDirTree20 w/TLsDirTree20PopUp, 
              TLsDirTreeCombo27 and
              TLsFilelistView27 w/TLsFilelistView27PopUp

Version    :- 2.70  (For Delphi versions 3, 4 & 5)

Author     :- Leo D. Shih <ldshih@ecn.ab.ca>

Copyright  :- (C)1998/2000 Leo D. Shih, All rights reserved

------------------------------------------------------------------------------
DISCLAIMER :- These components are currently distributed as Freeware,
              without warranty of any kind, either expressed or implied.
              In no event shall the author be liable for any problems
              or damages that may result from the use of these components.

              Suggestions for improvement or bug-fixing will be welcome.

------------------------------------------------------------------------------
ACKNOWLEDGMENTS
===============
  I'm most grateful to those people in the Delphi community who have
  reported bugs, suggested fixings, or recommanded improvements. In
  particular, I would like to thank Ales Trtnik, Brad Huggins,
  Claude Hunter, Detlef Scheil, Harrie Roaymans, Marcelo Rodrigues,
  Helmut Knaack, Peter Caliban, Steve Pinneo, and Tom Lisjac for their
  professional suggestions.

==============================================================================

1. Brief Description
====================

  1.1 TLsDirTree20 w/TLsDirTree20Popup
  ------------------------------------
  TLsDirTree20 is a simple but fully functional Directory TreeView, that
  displays the structure of the File System. It supports creating, renaming
  and deleting of directories, it can also calculate the size of a selected
  portion of the directory-tree, through the use of its context menu.

  1.2 TLsDirTreeCombo27
  ---------------------
  TLsDirTreeCombo27 is a specialized ComboBox with a dropdown Directory
  TreeView, that is similar to TLsDirTree20, displaying a hierarchical tree
  of drives and directories in the File System.

  1.3 TLsFilelistView27 w/TLsFilelistViewPopUp26
  ----------------------------------------------

  TLsFilelistView27 is a File ListView component. In addition to its normal
  functions, It also performs various file management tasks, such as cut, copy,
  paste, rename, delete, open, view and send_to operations on files.  It also
  provides statistics on Disk-FreeSpace, Selected-Numbers and Selected-Size as
  those available in the Windows Explorer.

  TLsFilelistViewPopUp26 is LsFilelistView27's build-in Context Menu, containing
  commands that perform operations on files.



2. Added properties:
===================

 2.1 TLsFilelistView27
 ---------------------

  2.1.1 Published 
  ---------------
   DateFormat       - Provides eight preset ShortDate Formats and a Customize
                      option:
                           
                         Option         Format              Remarks
                         ==========     ================    =================
                         df_Customize   User configuable
                         df_ddMMyy_DE   dd.MM.yy            German
                         df_ddMMyy_GB   dd/MM/yy            British / French
                         df_ddMMyy_IT   dd-MM-yy            Italian
                         df_ddMMyyyy    dd/MM/yyyy          British
                         df_MMddyy      MM/dd/yy            American
                         df_MMddyyyy    MM/dd/yyyy            - " -
                         df_yyMMdd      yy-MM-dd            Ansi / Japan
                         df_yyyyMMdd    yyyy-MM-dd            - " -

                      When 'Customize' option is selected, the Regional setting
                      in Windows Control Panel is used, thus the DateFormat can
                      be configured by users at runtime.

   TimeFormatStr    - is Time Style format string, for example HH:mm:ss.
                      If this property is empty, the Regional setting in Windows
                      Control Panel will be used, thus it's user configurable.

   DblClickToOpen   - Option to disable the build-in DblClick procedure, thus
                      users can code their own OnDblClick Handler. (It was named
                      as DblClickEnabled in previous version)

   Directory        - Currently selected directory that contains files and/or
                      sub-directories to be displayed in the TLsFilelistView27.
                      Changing the value of this property will update the
                      TLsFilelistView27 to display items in the new directory.

   DirTree          - Provides a simple way to connect TLsFilelistView27 to
                      TLsDirTree20 component.

   DirTreeCombo     - Provides a simple way to connect TLsFilelistView27 to
                      TLsDirTreeCombo27 component.

   DriveFreeSpace   - Free space on the current drive, in kB.

   FileType         - Determines which file types are displayed based on the
                      attributes of files. FileTypes included are ftReadOnly,
                      ftHidden, ftSystem, ftArchive, ftNormal.

   HideFileExt      - If it's set to True, file extensions will not be displayed.

   Mask             - Limits which files are displayed. Default mask is '*.*'.
                      (To specify multiple masks, separate the file mask spec.
                      with semicolons).

   PopupMenuEnabled - Option to disable the build-in Context-Menu, thus allowing
                      users to use the PopupMenu Property for their own popupmenu.

   SelectedNumber   - Number of selected items in the current directory.

   SelectedSize     - Total bytes of selected items in the current directory.

   ShowFolders      - Specifies whether or not folders are shown in the
                      FilelistView26 together with files.


  2.1.2 Public
  ------------

   SelectedItem     - The FullName of the selected Item (path + ItemName).

   DirectorySize    - Total bytes of files in the current directory, excluding
                      sub-directories, if any.

 2.2 TLsDirTreeCombo27
 ---------------------

  2.2.1 Published
  ---------------

   SelectedPath     - The Directory Path of the currently selected treenode in
                      the TLsDirTreeCombo27.

   FileList         - Provides a way to connect TLsDirTreeCombo27 to
                      TLsFilelistView27.

   ExpandRoot       - Specifies whether the RootNode is expanded.

   TreeHeight       - Set the Height of the drop-down treeview, default is 195.

   Glyph            - An option to load an alternative bitmap to replace the
                      default Glyph in the button of LsDirTreeCombo27.

 2.3 TLsDirTree20
 ----------------

   SelectedPath     - The Directory Path of the currently selected treenode in
                      the TLsDirTree20.

   FileList         - Provides a way to connect TLsDirTree20 to TLsFilelistView27.

   PopupMenuEnabled - Option to disable the buildin Context-Menu, thus allow
                      users to use the PopupMenu Property for their own popupmenu.


3. Added Procedures/Functions (Public):
======================================

 3.1 TLsFilelistView27
 ---------------------

   OneLevelUp       - A step back in the directory hierarchy (ie. move to its
                      parent node).

   CutCopy()        - |
                      |
   Paste            - |  Perform copy, move, delete or rename operation on files.
                      |-
   DeleteItems      - |  Using CutCopy(0) for Copy and
                      |        CutCopy(2) for Cut opration.
   RenameFile       - |

   FindFile         - To activate Windows FindDialog for locating specified file.

   FileAttr         - To view or edit the selected item's attributes.

   OpenItem         - Open executable files or other type of files which have
                      been associated with their respective applications in the
                      Windows Registry.

   ViewFile         - Provides programmers with a quick viewer of *.c, *.cpp,
                      *.dpk, *.dpr, *.h, *.inf, *.ini, *.pas, *.prg, *.txt,
                      *.doc, *.rtf, *.wri, and *.bmp files

   NewFolder        - Create a new folder.

   SetColumnWidth   - Set the width of Columns 0 to 4.  The default setting is:

                         SetColumnWidth(160, 90, 90, 100, 40);

                      If the Width of a column is set to zero, that column will
                      be invisible.


 3.2 TLsDirTreeCombo27
 ---------------------

   OpenPath()       - To select a treenode in accordance with the specified
                      directory path.

   ResetTreeView    - Reload the TLsDirTreeView.

 3.3 TLsDirTree20
 ----------------

   OpenPath()       - To select a treenode in accordance with the specified
                      directory path.

   ReLoad           - Reload the TLsDirTree.

   AddNewNode()     - Add a new directory to the file system.

   DeleteNode()     - Delete an existing directory from the file system.

   GetTreeSize()    - Calculate the TreeSize of the selected Directory and all
                      its sub-directories.


4. Installation
===============

   Unzip FileExpl.zip to any directory, then copy LsFileExplorer27.pas,
   LsFileExplorer27.dcr and LsFileExplorer27.res to a directory that is in the
   Lib search path.


 4 For Delphi versions 3x , 4x  & 5x
 -------------------------------------

   All three components can be added to an existing Package, eg. Samples or
   Delphi User's Components Package, by following steps:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -