Click here to Skip to main content
16,020,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use two richtextbox.

Richtextbox1 and Richtextbox2.

I want to set font and style according to richtextbox2 to richtextbox1 and also I want to maintain the scroll posititon and text coming from the database.

I want to format only that text which is written in richtextbox2 not format the whole of richtextbox1.
Posted
Updated 25-Aug-10 22:09pm
v2
Comments
Christian Graus 26-Aug-10 4:09am    
What have you tried ? Google ? MSDN ?
Dalek Dave 26-Aug-10 4:09am    
Edited for Grammar, Spelling and Syntax.
Ankur\m/ 26-Aug-10 6:14am    
Formatting a question is marked 'Minor Edit', Dave. :P

1 solution

Take a look at this article:

A Windows Forms based text editor with HTML output[^]

It's not with a Richtextbox but the code in it to update the corresponding controls (bold button / italic button / ...) with what is selected in the document is similar to what you'll have to do.
I'm sure you'll be able to adapt it to your needs.

For the scroll position take a look at this : http://www.eggheadcafe.com/community/aspnet/14/10023805/positioning-cursor-within-textbox.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900