Hi everyone,
I have a simple UltraTextEditor, which its Multiline = true, which is used to display some note description. When the form loads its set as ReadOnly = true; I want the textbox to be editable when I double click it. I used the DoubleClick event and also tried MouseDoubleClick events to set the ReadOnly = false. But no use!! Am I missing anything?
Please need urgent help!
Thanks in advance...
NW
The UltraTextEditor is positioning a .NET TextBox within its bounds, even when it is set to ReadOnly mode. What you could do is hook the DoubleClick event of the TextBox in the ControlAdded event of the editor, i.e.:
private void ultraTextEditor1_ControlAdded(object sender, ControlEventArgs e){ e.Control.DoubleClick += new EventHandler(Control_DoubleClick);}
private void ultraTextEditor1_ControlRemoved(object sender, ControlEventArgs e){ e.Control.DoubleClick -= new EventHandler(Control_DoubleClick);}
void Control_DoubleClick(object sender, EventArgs e){ this.ultraTextEditor1.ReadOnly = false;}
-Matt
Thanks Matt & Mike !! it works fine..
FAQ:Mouse events such as MouseDown, MouseUp, and DoubleClick do not fire for an UltraWinEditor it is in edit mode.