Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listview - Add Icons To Columns Headers ? 1

Status
Not open for further replies.

Mahey

Programmer
Dec 24, 2008
52
SA
Hi,
Iam looking to add the icons to Column Headers of listview
is it possible from vb.net?

ListView1.View = View.Details
ListView1.HeaderStyle = ColumnHeaderStyle.Nonclickable

ListView1.Columns.Add("Employee ID", k1 - 20, HorizontalAlignment.Left)

ListView1.Columns.Add("First Name", k1, HorizontalAlignment.Left)

dr1 = cmd3.ExecuteReader

While dr1.Read

ListView1.Items.Add(New ListViewItem(New String() {dr1(0).ToString, dr1(1).ToString, dr1(2).ToString}))

End While
dr1.Close()

Thanks Again
MAHEY
 
1. Add an ImageList from your ToolBox to your form.
2. Add some images to that ImageList
3. Set your ListView's SmallImageList to that ImageList
4. For your columns, set the ImageIndex property to the appropriate image.

You can do all of this in the designer.
 
Always Thanking To Our RiverGuy

By MAHESH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top