c# - 2 rich edit controls, same text -


i've put 2 rich edit controls, should display same text. so, when edit text in 1 of them, other should reflect changes. problem - don't want put code in text changed event:

control1.rfttext = control2.rtftext 

because create new instance of string each time text edited.

is there way send same instance of string both of controls or there other solutions problem?

control1.rfttext immutable string if want modify it, you'll have create new string.

using control1.rfttext = "my new string" create new string , appoint rfttext field said. if serious optimizing sort of value assignments, can create own implementation of derived rich edit class use sort of stringbuilder logic, or may internally represent text char[] array , modify that, may turn out real challenge, decide wisely.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -