alander
Well-known member
I have 2 checkboxes to show if italics / bold was selected, however it doesnt show when i click ok on the dialog, but only show the 2nd time i open the dialog and click ok
Help anyone?
wrong code
It was the with, i cant bind it b4 user clicks ok
right code
Help anyone?
wrong code
VB.NET:
With fontDlgDefault.Font
If fontDlgDefault.ShowDialog() = Windows.Forms.DialogResult.OK Then
txtDefFontFamily.Text = .Name
txtDefFontSize.Text = .Size
If .Italic Then : chkDefItalic.Checked = True
Else : chkDefItalic.Checked = False
End If
If .Bold Then : chkDefBold.Checked = True
Else : chkDefBold.Checked = False
End If
End With
End If
It was the with, i cant bind it b4 user clicks ok
right code
VB.NET:
If fontDlgDefault.ShowDialog() = Windows.Forms.DialogResult.OK Then
With fontDlgDefault.Font
txtDefFontFamily.Text = .Name
txtDefFontSize.Text = .Size
If .Italic Then : chkDefItalic.Checked = True
Else : chkDefItalic.Checked = False
End If
If .Bold Then : chkDefBold.Checked = True
Else : chkDefBold.Checked = False
End If
End With
End If
Last edited: