Control - List View

images\btn_ctrl_listview.gif Displays data as ListItem objects with an optional icon. Four different views provide data as icons, small icons, a list or a report. Can show data in columns with or without column heads. A very sophisticated control.

 

Note: Non-Common Control properties are prefaced with "lvw", suppressed in the following for greater legibility.

 

Properties

 

In addition to the properties listed below, a Control tab provides access to certain frequently used form properties for this control. See the Form Properties topic for information on those properties.

 

 

List View

General

 

MousePointer

The type of mouse pointer displayed when over the list view. Choose from 16 different types plus a custom pointer

View

Style of display for each item: Icon - Full size icon and text label. SmallIcon - small icon and text label arranged horizontally. List - small icon and text label arranged vertically in columns. Report - small icons and text labels arranged in columns with additional info columns as desired.

Arrange

None, AutoLeft, AutoTop: Left and top align items along the left side or top of the control.

LabelEdit

Automatic - BeforeLabelEdit event is generated when the user clicks the label of a selected node. Manual - BeforeLabelEdit event generated only when the StartLabelEdit method is invoked.

BorderStyle

FixedSingle (default) or None. None may be used with Flat Appearance to achieve an uncaptioned rectangle of background color.

Appearance

3D or Flat. 3D is the standard Windows look. Flat results in a rectangular square of background color with a foreground color border.

OLEDragMode

DragManual (default) or DragAutomatic. DragManual means the program handles all OLE drag/drop operations, while DragAutomatic means the list view handles all OLE drag/drop operations

OLEDropMode

Set to None (default) if the list view does not accept OLE drops and is to display the No Drop cursor if an OLE drop is attempted. Set to Manual, the list view will trigger OLE drop events, allowing programs to handle the OLE drop operation in code.

HideColumnHeaders

False (default) - Column headers are visible. True - column headers are hidden.

HideSelection

True or False. True means that highlighted text will not appear highlighted when the list view loses the focus. False means that highlighted text stays highlighted even when another form or dialog has the focus.

LabelWrap

True (Default) - labels wrap. False - labels don't wrap.

MultiSelect

Whether or not user can make multiple selections from the list view. NoMultiSelect means none. Simple, means a mouse click or SPACEBAR selects/deselects while arrow keys move focus. Extended adds CTRL and SHIFT click selection in the usual way.

Enabled

True or False. True means the object can respond to user-generated events, false prevents it from responding. We can disable a control like a list view if we wish it to simply display information in a read-only way.

AllowColumnReorder

False (Default) - User cannot reorder columns. True - Users can reorder columns.

Checkboxes

False (Default) - Checkboxes do not appear. True - Checkboxes appear.

FlatScrollbar

False (Default) - Standard scrollbars appear. True - FlatScrollBar style scrollbars appear.

FullRowSelect

Specifies if the entire row is selected. Valid only when View is set to Report.

Gridlines

Specifies if gridlines appear when View is set to Report. False (Default) - No gridlines. True - Display gridlines.

HotTracking

Whether or not mouse-sensitive highlighting is enabled. True - Header captions are highlighted as the mouse passes over them. False - HeaderItem objects do not respond to mouse movement unless the mouse button is clicked.

HoverSelection

Whether or not a ListItem object is select on a mouse hover. False (Default) - No selection when the mouse hovers over an item. True - Item is selected on mouse hover.

 

 

Image Lists

 

Normal

ImageList to use for images of standard sized icons.

Small

ImageList to use for small icons.

Column Header

ImageList to use for images in column headers.

 

 

Sorting

 

Sorted

True - Items are sorted according to the SortOrder property. False - Items are not sorted.

SortKey

A positive integer or zero. 0 - Sort using theListItem object's Text property. >= 1 - Sort using subitem whose collection index is specified here.

SortOrder

Ascending - From beginning of alphabet, earliest date or lowest number. Descending - The other way.

 

 

Column Headers

 

Index

Uniquely identifies the column. If changing columns dynamically, use the Key since the index might change. Begins with 1.

Insert/Remove Column

Add or remove columns at design time.

Text

Caption for this column.

Alignment

Left - Text in columns is aligned left. Right - Text aligned right. Center - Text is centered.

Width

Width of this column.

Key

A unique string that identifies each column.

Tag

Stores a string available for the programmer to use as desired. Often used to store an identification or description string of some sort.

Icon Index

Which image to use in the Column Header ImageList to use for this column. Begins with 0.

 

 

Color

 

Back Color

Color to be used for the list view's background.

Fore Color

Color to be used for the list view's foreground, the color of the text caption.

Color Set

Choose from Standard Colors (standard Windows non-dithered colors) or Windows System Colors. The latter will be defined by the user's Control Panel settings and is normally the setting used so that the form changes appearance like the rest of Windows if the Control Panel settings are changed.

Color Palette

Displays available colors. Click on the property to be changed to highlight it in the Properties pane, click on the desired color in the Color Palette pane and then press Apply.

Edit Custom Color

Change the custom color presented in the Color Palette when the Color Set is set to Windows System Colors.

 

 

Font

 

Properties

Font properties that may be changes.

Font

Choose a font installed on this system. It's wise to choose standard Windows fonts such as MS Sans Serif that are universally available.

Size

Size of font, in points.

Effects

Bold, Italic, Underline or Strikeout.

Sample Text

A preview of the selected settings.

 

 

Picture

 

MouseIcon

Custom icon to use when the MousePointer property is set to 99. Like Visual Basic, will not load animated cursor (.ani) files.

Picture

Graphic to show on an enabled control.

 

 

 

Note: graphics are loaded at design time and saved within the project. When browsing to find the graphic to be used, .bmp, .ico, .wmf, .gif or .jpeg files may be used.