ListView control in C#
ListView control is like a ListBox control but with more functionalities. With such a control one can get a pane that looks excatly like the right pane in windows explorer. Certain stuffs that stand out in this control when you compare it with the ListBox control are,
Views
ListView control has many views like,
- LargeIcon - The list items are listed as tiles (the usual windows tile view style). There will not be any horizontal scrollbar by default in this view
- Details - The list items will have more columns that tells about addition information of any item
- SmallIcon - Similar to LargeIcon, but will have small images to the left of eash item
- List - The usual ListBox style
- Tile - Combination of ListStyle and LargeIcon style views
ImageList
Using ListView control one can assiciate images with list items
Checkboxes
We can even add checkboxes to each and every items. This is not supported in Tile view though
Having items that behaves like hyperlinks
Columns
In the Details view one can have many columns and items can be added under each column (like the windows explorer Details view style). On can even sort things under the ListView control just by clicking the headers of the ListView control.
Under the Details view, we can display items in grids, giving it the classic datagrid view style
Tooltip text
Show tooltips for the list items just by making this property to true
- ListView — LargeIcons mode
- ListView — Details mode
- ListView — SmallIcons mode
- ListView — Tile mode
- ListView — Tile mode
- ListView — HotTracking enabled
- ListView — Grids enabled
This post is intended to be an introduction to the functionalities of a ListView control. My next post will be about the ways of using these funtionalities.




[...] and one image. I was trying out some control and I came to know about the ListView control. In my last post, I was talking about the features that are provided by it. Now lets try to find out ways to use [...]
Using ListView control in C# « Programmers’ Log
July 18, 2008 at 11:07 pm