Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to get the current character’s color of a RichTextBox?

character color RichTextBox
0
Posted

How to get the current character’s color of a RichTextBox?

0

The RichTextBox has provided you a property named SelectionColor; you can use this property to get the current character’s color private void richTextBox1_MouseMove(object sender, MouseEventArgs e) { int index = richTextBox1.GetCharIndexFromPosition(e.Location); richTextBox1.SelectionStart = index; label1.Text = richTextBox1.SelectionColor.ToString(); } Related threads: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2139967&SiteID=1

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123