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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DatagridView Button Icon 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I'm using the below code to add a button to the last column of a datagrid. I'm wondering how can I make an image on that button ?

Any help would be appreciated.

Dim btn As New DataGridViewButtonColumn()
DataGridView1.Columns.Add(btn)
btn.HeaderText = "Click Data"
btn.Text = "Click Here"
btn.Name = "btn"
btn.UseColumnTextForButtonValue = True

 
Thanks,

I saw that but can't understand what this means - e.Graphics.DrawImage(My.Resources.Delete, CInt((e.CellBounds.Width / 2) - (My.Resources.Delete.Width / 2)) + e.CellBounds.X, CInt((e.CellBounds.Height / 2) - (My.Resources.Delete.Height / 2)) + e.CellBounds.Y)


Where do they declare My.Resources ?

 
Always suggested that instead of just saying "I got it.", you explain what you "got". That way, anyone reading your post knows HOW you solved your problem so they can benefit from your experience. [peace]

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
C#.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top