| Public Member Functions | |
| Remove ([in] VARIANT Index) | |
| Call this method to remove one item from the collection. | |
| Clear () | |
| Removes all of the items from the collection. | |
| Add ([in] BSTR Name,[out, retval] IDispatch **Item) | |
| Call this method to create a new item in the collection. | |
| Properties | |
| LPUNKNOWN R | _NewEnum  [] | 
| Returns the enumerator for the collection. | |
| VARIANT R | Item [[in] long Index]  [] | 
| Returns the specified item in the collection. | |
| long R | Count  [] | 
| Returns the number of items in the collection. | |
The method Groups returns a ListViewGroups object. An ListViewGroups object is a collection of the ListViewGroup objects. Requires Comctl32.dll version 6. Requires visual styles (Themes). Without visual styles groups not visible. Example:
o = new ActiveXObject("Scripting.WindowSystemObject") o.EnableVisualStyles = true fs = new ActiveXObject("Scripting.FileSystemObject") f = o.CreateForm(0,0,0,0) f.ClientWidth = 550 f.ClientHeight = 650 f.CenterControl() Box = f.CreateListView(10,10,250,300) Box.HotTrack = true Box.Align = o.Translate("AL_CLIENT") Ext = new ActiveXObject("Scripting.WindowSystemObjectExtensions") Box.LargeImages = Ext.SystemImageListLarge Box.SmallImages = Ext.SystemImageListSmall Box.Style = o.Translate("LV_VIEW_ICON") var Data = ["1.txt","1.jpg","1.png","1.exe","1.bat","1.com","1.js","1.vbs","1.bmp","1.ini","1.xml"] Group1 = Box.Groups.Add("Group 1") Group2 = Box.Groups.Add("Group 2") Group1.SubTitle = "The group 1 description where" Group1.Task = "Task" Group1.DescriptionTop = "DescriptionTop" Group1.DescriptionBottom = "DescriptionBottom" Group1.SubsetTitle = "SubsetTitle" Group1.HeaderAlign = o.Translate("AL_CENTER") Group1.FooterAlign = o.Translate("AL_CENTER") Group1.Collapsible = true Group1.Footer = "Group 1 Footer Text" Group2.Footer = "Group 2 Footer Text" for (i = 0; i<Data.length; i++) { Item = Box.Add("Item "+i+": "+Data[i]) Item.ImageIndex = Ext.GetFileSysIconIndexLarge(Data[i],o.Translate("FILE_ATTRIBUTE_ARCHIVE")) Item.SubItems(0) = "The first line for "+i Item.SubItems(1) = "The second line for (a b c d e f g h j k)"+i Item.Group = i % 2 } Box.OnGroupLinkClick = OnGroupLinkClick function OnGroupLinkClick(Sender,Group){ f.MessageBox(Group.Header + " clicked") } f.Show() o.Run()
 
More function example you can see in Demo\JScript\Small\ListView\ListViewGroups.js.
| Add | ( | [in] BSTR | Name, | |
| [out, retval] IDispatch ** | Item | |||
| ) | 
Call this method to create a new item in the collection.
| Name | the header text for a new group. | 
| Item | A new ListViewGroup object. | 
| Clear | ( | ) | 
Removes all of the items from the collection.
| Remove | ( | [in] VARIANT | Index | ) | 
Call this method to remove one item from the collection.
| Index | The index of the element to remove or the element itself. | 
| LPUNKNOWN R _NewEnum | 
Returns the enumerator for the collection.
| long R Count | 
Returns the number of items in the collection.
| VARIANT R Item[[in] long Index] | ( | ) | 
Returns the specified item in the collection.