This is the code I entered according to websites I found some info:
========================================================
If ((toCheckBold = False) And (toCheckItalic = False)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold)
ElseIf ((toCheckBold = False) And (toCheckItalic = True)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold)
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Italic)
ElseIf ((toCheckBold = True) And (toCheckItalic = False)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Regular)
ElseIf ((toCheckBold = True) And (toCheckItalic = True)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Regular)
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Italic)
End If
========================================================
The problem is that the new definition for the font rams the old one.
How do I set them to be both Italic and Bold?
Thanks
Shahar
========================================================
If ((toCheckBold = False) And (toCheckItalic = False)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold)
ElseIf ((toCheckBold = False) And (toCheckItalic = True)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Bold)
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Italic)
ElseIf ((toCheckBold = True) And (toCheckItalic = False)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Regular)
ElseIf ((toCheckBold = True) And (toCheckItalic = True)) Then
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Regular)
lblToChange.Font = New Font(lblToChange.Font, FontStyle.Italic)
End If
========================================================
The problem is that the new definition for the font rams the old one.
How do I set them to be both Italic and Bold?
Thanks
Shahar