I have this code:
print_text.Text = "Patient number: " + ds.Tables("patients").Rows(0).Item(0)
print_text.AppendText(Environment.NewLine)
print_text.Text = print_text.Text + "Last name: " + ds.Tables("patients").Rows(0).Item(1)
print_text.AppendText(Environment.NewLine)
Now the above data i am adding programatically and it works fine. However in the above code i want to add Patient number and Last name in bold font.
When using a
RichTextBox, why not just use RTF?Example:
Result:
MSDN
This way, you can also easily wrap the RTF stuff into extension methods:
and use it like