I have a textbox in my C# Winform. The program assigns a value to the textbox by default.
I want the user to have a right click function to edit this text at runtime. So when the user right click to edit, the backgroud should become white and user should be able to edit the text. And after editing, the background should return to default and non editable
I have created a ContextMenuStrip with right click event to edit text as follows and assigned readonly property to false when user right clicks and press edit menu item:
private void editTextToolStripMenuItem_Click(object sender, EventArgs e)
{
itxt_CommonTitle.ReadOnly = false;
}
I am not sure how to proceed further. Is this possible using textbox?
ShortcutsEnabled
to false. – Reza Aghaei