C# Questions relating to TextBox
-
I'm a C# newbie. How can I insert a new line into a multi-line TextBox field? I've tried '\n' but instead of inserting a new line, it displays a strange character. Also, I want a particular method to execute when a user presses 'Enter' key after typing something in TextBox. Please help! :confused: mughalali
-
I'm a C# newbie. How can I insert a new line into a multi-line TextBox field? I've tried '\n' but instead of inserting a new line, it displays a strange character. Also, I want a particular method to execute when a user presses 'Enter' key after typing something in TextBox. Please help! :confused: mughalali
try "\r\n"
-
I'm a C# newbie. How can I insert a new line into a multi-line TextBox field? I've tried '\n' but instead of inserting a new line, it displays a strange character. Also, I want a particular method to execute when a user presses 'Enter' key after typing something in TextBox. Please help! :confused: mughalali
if the other suggestion doesn't work, it may be something like or one of those sets. for the return, why not do a keypress event? surgeproof ------------------------------------------------------- ithium is the best. 'Science without religion is lame, religion without science is blind.' --Albert Einstein 'The pioneers of a warless world are the youth who refuse military service.' --Albert Einstein
-
if the other suggestion doesn't work, it may be something like or one of those sets. for the return, why not do a keypress event? surgeproof ------------------------------------------------------- ithium is the best. 'Science without religion is lame, religion without science is blind.' --Albert Einstein 'The pioneers of a warless world are the youth who refuse military service.' --Albert Einstein
-
Not necessarily in the
TextBox
(which encapsulates the Edit common control). To dislay new lines in aTextBox
, theMultiline
(inheritted fromTextBoxBase
) needs to be set totrue
, as well as theAcceptsReturn
property.Microsoft MVP, Visual C# My Articles