How Can Transferdata from RitchTextBox to Label with all Formats. i.e RitchTextBox's Text Color ,Font,FontStyle
yousafc#
0
Junior Poster in Training
Recommended Answers
Jump to PostFor color make your label's forecolor equal the richtextbox's forecolor. Do the same with the Font property and it will include Bold,Italic,Underline,Strikethrough,etc.
Jump to PostWhat's happening is the richtextbox isn't taking on the characteristics of the text when you load it from a file. The secret is to select all the text then you can read selection font and selection color:
richTextBox2.SelectAll(); label1.Font= richTextBox2.SelectionFont; label1.ForeColor = richTextBox2.SelectionColor; label1.Text = richTextBox2.Text; …
All 6 Replies
tinstaafl
1,176
Posting Maven
yousafc#
0
Junior Poster in Training
tinstaafl
1,176
Posting Maven
yousafc#
0
Junior Poster in Training
tinstaafl
1,176
Posting Maven
yousafc#
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.