Hi all,
How do you change the fonts of a dgv by selecting cells? Apparently I am doing something wrong here.
Private fontDlg As New FontDialog()
Private currFont As Font = Control.DefaultFont
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If fontDlg.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
currFont = fontDlg.Font
dgv.SelectedCells.fonts = currFont '<--error message
Label1.Font = currFont '<---No error
End If
End Sub
How do you change the fonts of a dgv by selecting cells? Apparently I am doing something wrong here.
Private fontDlg As New FontDialog()
Private currFont As Font = Control.DefaultFont
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If fontDlg.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
currFont = fontDlg.Font
dgv.SelectedCells.fonts = currFont '<--error message
Label1.Font = currFont '<---No error
End If
End Sub