+CreateHandle is an overridden method in +TCustomShellListView. It calls the inherited method on entry to +allocate the handle for the windowed control with creation parameters and +window flags as needed. An internal flag is checked to determine if the +control is waiting for handle creation to finish loading the values in Items. +When set, PopulateWithRoot is called to load the file system entries in Items +and the flag is cleared. +
++CreateHandle is called from methods in the ancestor class when HandleNeeded +is called for the class instance or its Parent. +
+PopulateWithRoot is a procedure used to fill the Items -in the list view with file system entries for the Root directory. +property with file system entries for the directory specified in +Root.
-No actions are performed in the method at design-time, or when -Root contains an empty string (''). +No actions are performed in the method at design-time, or when Root contains +an empty string (''). In addition, the actions may be delayed if the +Handle for control has not been allocated. An internal flag is set to +indicate the condition, and PopulateWithRoot will be called again when the +Handle is created in CreateHandle.
-PopulateWithRoot calls the internal GetFilesInDir -helper to get a list of file system items for the path which match the -Mask and ObjectTypes specified for the control. Each of -the files in the list are passed to DoAddItem / -OnAddItem to determine if they can be added to the -Items in the control. +PopulateWithRoot calls the internal GetFilesInDir helper routine to get a +list of file system items for the path which match the Mask and ObjectTypes +specified for the control. Each of the files in the list are passed to +DoAddItem / OnAddItem to determine if they can be added to the Items property.
-A TListItem instance is added to Items to represent the files or -directories. The Data property in the list item is used to store a -pointer to the file size. Values are added to SubItems with the +A TListItem instance is added to Items to represent each of the files or +directories. The Data property in the list item is used to store a pointer to +the file size. Values are added to SubItems in the list item to store the string representation for the file size, and the file extension.
-When UseBuiltInIcons is set to True, the -GetBuiltInImageIndex method is called to get the -ImageIndex for the built-in icon for a list item. This action is -performed using the path to the current file name when LargeImages and/or -SmallImages have not been assigned. The value in ViewStyle -determines the image size requested. When ViewStyle is vsIcon, -LargeImages is checked (when assigned). Otherwise, SmalImages is -checked (when assigned). If an imagelist exists in either LargeImages or -SmallImages, the existing ImageIndex in the list item is used. +When UseBuiltInIcons is set to True, the GetBuiltInImageIndex method +is called to get the ImageIndex for the built-in icon on a list item. This +action is performed using the path to the current file name when LargeImages +and/or SmallImages have not been assigned. The value in ViewStyle determines +the image size requested. When ViewStyle is vsIcon, LargeImages is +checked (when assigned). Otherwise, SmallImages is checked (when assigned). +If an image list exists in either LargeImages or SmallImages, the existing +ImageIndex in the list item is used.
-The OnFileAdded event handler is signalled (when assigned) for -each new entry added to Items. +The OnFileAdded event handler is signalled (when assigned) for each new entry +added to Items.
-The Sort method is called prior to exit to order the Items in the -control using the option specified in the FileSortType property. +The Sort method is called prior to exit to order the Items in the control +using the option specified in the FileSortType property.