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
Post a Comment