How to transfer text to label from richtextbox
-
Hello, I have been trying to transfer text to a label from richtextbox. The problem is I can't equalize font and text color. For example, if I write "Hello World!" it seems the same on label but when I write "Hello World!" it seems "Hello World!". Is there a way to equalize them? Thanks in advance.
-
Hello, I have been trying to transfer text to a label from richtextbox. The problem is I can't equalize font and text color. For example, if I write "Hello World!" it seems the same on label but when I write "Hello World!" it seems "Hello World!". Is there a way to equalize them? Thanks in advance.
label1.Text = richTextBox1.Text;
label1.Font = richTextBox1.Font;A label is limited to using a single font to display it's text. That means one color, one font-family, one style. There are some custom components on the internet that can display RTF, or you can use the
RichTextBox
itself to display it.I are troll :)