Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27351

VS 2008 Adding background image and text to datagridview control column header

$
0
0
Hello,

I found this code which adds an image as a column header background image. Is there a way to show the header text also?

Thanks!

Code:

        myImage = New Bitmap("c:\grd_head.png")
        If True Then
            If e.RowIndex < 0 AndAlso e.ColumnIndex = 0 Then
                e.Graphics.DrawImage(myImage, e.CellBounds)
                e.Handled = True
            End If
        End If
    End Sub


Viewing all articles
Browse latest Browse all 27351

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>