c# - How can I auto-format text pasted into rich textbox? -


i have notes program use document cases while working, when copy , paste data other windows pastes in formating site. there setting rich text boxes (and text boxes in general) remove formatting , put text textbox? if not can have use method looks @ clipboard contents , sends string specific font/size etc?

you should able unformatted string specifying textdataformat , set text:

var stringtopastein = clipboard.gettext(textdataformat.text); 

or letting richtextbox automagically using dataformats options:

dataformats.format myformat = dataformats.getformat(dataformats.text); richtextbox1.paste(myformat); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -