|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGridView: dynamic font size changeHow do you change the font size dynamically in a single selected cell?
Lennart Hi,
Try changing the cell style's font in the cell paint event. Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting Try If DataGridView1.Item(e.ColumnIndex, e.RowIndex).Selected Then e.CellStyle.Font = New Font(Me.Font, FontStyle.Bold) Else e.CellStyle.Font = New Font(Me.Font, FontStyle.Regular) End If Catch End Try End Sub Ken ---------------- Show quoteHide quote "Lennart Nielsen" <lniel***@uni-systems.com> wrote in message news:e9k0y2pKGHA.1124@TK2MSFTNGP10.phx.gbl... > How do you change the font size dynamically in a single selected cell? > > Lennart > |
|||||||||||||||||||||||