|
Views and Styles
List view controls can display their contents in four different views. The current view is specified by the control's window style. Additional
window styles specify the alignment of items and control-specific functionality of
the list view control. Information about the four views follows.
View
| Description
| Icon view
| Specified by the LVS_ICON window style.
Each item appears as a full-sized icon with a label below it. The user can
drag the items to any location in the list view window.
| Small icon view
| Specified by the LVS_SMALLICON window style.
Each item appears as a small icon with the label to the right of it. The user
can drag the items to any location.
| List view
| Specified by the LVS_LIST window style.
Each item appears as a small icon with a label to the right of it. Items are
arranged in columns and cannot be dragged to any arbitrary location by the user.
| Report view
| Specified by the LVS_REPORT window style.
Each item appears on its own line with information arranged in columns. The
leftmost column contains the small icon and label, and subsequent columns contain
subitems as specified by the application. Unless the LVS_NOCOLUMNHEADER window
style is also specified, each column has a header.
|
You can change the view type after a list view control is created. To retrieve
and change the window style, use the GetWindowLong and SetWindowLong functions. To determine the window styles that correspond to the current
view, use the LVS_TYPEMASK value.
You can control the way items are arranged in icon or small icon view by
specifying either the LVS_ALIGNTOP (default) or LVS_ALIGNLEFT window style. You can
change the alignment after a list view control is created. To isolate the
window styles that specify the alignment of items, use the LVS_ALIGNMASK value.
Additional window styles control other options for example, whether a user can edit labels in place, whether more than one
item can be selected at a time, and so on. For a complete list of the list view
window styles, see List View Window Styles.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|