Post by bobowk on Aug 1, 2016 17:38:13 GMT 10
So, I have 2 text different size. Example: Hi Hi If I highlight and change size, it changes to the same size as the toolstripcombobox eg. Hi Hi If I change fonts Hi Hi It turns out, after changing size, like this: Hi Hi
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
If RichTextBox1.SelectionFont IsNot Nothing Then
RichTextBox1.SelectionFont = New Font(ComboBox1.SelectedText, CInt(cmbFontSize.Text), RichTextBox1.SelectionFont.Style)
Else
RichTextBox1.SelectionFont = New Font(ComboBox1.Text, CInt(cmbFontSize.Text), RichTextBox1.SelectionFont.Style)
End If
End Sub
Private Sub cmbFontSize_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbFontSize.SelectedIndexChanged
If RichTextBox1.SelectionFont IsNot Nothing Then
RichTextBox1.SelectionFont = New Font(ComboBox1.SelectedText, CInt(cmbFontSize.Text), RichTextBox1.SelectionFont.Style)
Else
RichTextBox1.SelectionFont = New Font(ComboBox1.Text, CInt(cmbFontSize.Text), RichTextBox1.SelectionFont.Style)
End Ifinsert code here
|
|
Post by bobowk on Aug 5, 2016 17:50:24 GMT 10
Prezence If I change two different fonts it changes to the same font and size
|
|