This is going to turn out to be simple, I’m sure, but I couldn’t find anything on Google about this. I have a Winforms application that has a textbox. When I hit the TAB key, the cursor is jumping to the next control. What I want instead is for an actual tab (or 4 spaces) to be inserted into my textbox. What property am I missing?
Share
You should set the
AcceptsTabproperty totrueon yourTextBox. This will insert an actual TAB character.From the MSDN page:
The
Multilineproperty must also be true to get a TAB character in the control.If the
AcceptsTabproperty is set to true, the user must press CTRL+TAB to move the focus to the next control in the tab order.