Please see my comment. It's not good to answer for all variants. Always specify exact type. There is more than one type called
RichTextBox
. Always use a full name.
Also, "on its edit" might mean different things. It can be the event
Focus
or
TextChanged
. Think about which one you need to indicate "on its edit" and disable the ComboBox instance in its handler:
myRichTextBox.TextChanged += (sender, eventArgs) => {
myComboBox.Enabled = false;
}
See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox.aspx[
^].
—SA