I have the code for a Windows Form application which is written in C#. There's a single-line text box as an input field in this application. I want to change this text box to allow taking multiple lines as input. This box has a fixed width and as soon as the user inputs a string longer than the width, the rest of the input should be moved to the next line. I don't know what kind of code change will be needed for this but first I need to be able to find out where the code this input textbox is.
I have never worked with Windows Form apps before this so don't know how I can do this. I tried to start the application with the debugger in Visual Studio and I see some options like "Go to Live Visual Tree", "Show in XAML Live Preview", "Select Element", "Display Layout Adorners" and "Track Focussed Element". I think I will have to use some of these but I couldn't find anything helpful by googling.
CodePudding user response:
- Select "that" textbox, and press F4. This will open Properties Window.
- From the property window, change the "Multiline" property to True.
- This will allow your textbox to have multiline input at runtime.
CodePudding user response:
If you want to change this text box to allow taking multiple lines as input, you can refer to the following setps:
First right-click on the textbox and choose Properties.

Then change Multiline to True.

Finally change WordWrap to True. If the user's input is longer than the width of the textbox, the rest of the input will be moved to the next line.

