|
||
Bug fixes and minor enhancements to the control: The Selected property of a ListItem always returned false, meaning it was impossible to determine which items were selected in a multi-select ListView. Corrected. Same problem with the ItemCut property. Icon property of ListItem set the icon of the next item along in the control. Fixed. Position property added to the ColumnHeader object to allow the order of the column headers to be read and set programmatically. Insert before parameter to the Add method of the ListItems collection was ignored. Corrected. Setting a column alignment to right caused the column to be centred, and vice-versa. Fixed. Mouse Up events were only generated for double-clicks. Now corrected. A KeyDown event was generated when a KeyUp should have been. Fixed Option to place the background image at a specified location rather than tile it added. NoColumnHeaders property added to allow column headers to be hidden in Detail view. Added a call to LoadLibrary on Shell32.DLL to prevent crashes when using a manifest. Thanks to Ben Andersen, Ian Goodwin, Vasanth Raj, Greg Thomson, Frank Peters for the bug reports and code. |
vbAccelerator ListView ControlUse the latest ListView features This control provides an alternative to the VB ListView control and adds support for almost all of the new ComCtl32.DLL v6.0 features that are missing from the VB version: ListView grouping, Tile view with configurable sub-items, Multiple Work Areas and more. ListView Control FeaturesThe ListView control object model is shown below: ListView Object Model Here's a brief tour of features of these objects: The ControlThe vbalListViewCtl control provides access to the various object collections, raises events and also lets you configure the visual properties of the control. Most of these are standard, however some notable features are:
cListItemThe cListItem object allows you to configure ListItems. Notable features are that you can add items to groups using the Group method. cSubItemThe cSubItem object lets you configure the subitem text and image, and whether it displays in the Tile View using the ShowInTile property. When adding subitems to a tile, the items are displayed in the order that the ShowInTile property is called, and the number of items that are actually shown is configured using the control's TileViewItemLines property (whether everything is displayed depends on the available size of the tile). cItemGroupThe cItemGroup allows you to configure groups added to the ListView. Once you've added a group you can specify whether it should be a Header or a Footer by using the GroupType property, specify the text alignment using the Align property and check whether the group is displayed or collapsed using the State property. Note when using groups that you can specify whether groups are enabled or disabled using the Enabled property of the cItemGroups collection and that if groups are enabled, only those items which have been added to groups are displayed. cWorkAreaListView work areas allow you to create multiple regions in the ListView for grouping objects together. Once you've added a WorkArea, you can move an item into it either by dragging or by using the ListItems Left and Top properties to place it in the region. Note WorkAreas do not clip the ListItems within them. This means that if you place too many items into an area for the size of the region, they just spill out off the bottom of the WorkArea. Linking to ComCtl32.DLL v6.0If you want to use new features like Tile View and Grouping then you will need to link your application to ComCtl32.DLL v6.0 using a Manifest. This is described in the articles Using Visual Styles and Making Visual Styles apply at design and debug-time. Note that ComCtl32.DLL is only available on Windows XP or above. Important If you are running on a pre-XP system, then you will need to wrap calls to the Groups collection in an error handler, since this object will return Nothing. EOEThere are a few omissions with the control at this point which are still being researched:
|
|
|