Use this control in lieu of the TextBox, and it should
solve the problem:
//////////////////////////////////////////////////////////////
using System.Windows.Forms;
namespace CaddZone.AutoCAD.UI.Controls
{
public class MultilineTextBox : System.Windows.Forms.TextBox
{
public MultilineTextBox()
: base()
{
this.Multiline = true;
}
const int DLGC_WANTCHARS = 0x0080;
const int WM_GETDLGCODE = 0x0087;
protected override void WndProc( ref Message m )
{
if( this.AcceptsReturn && m.Msg == WM_GETDLGCODE )
m.Result = new IntPtr( DLGC_WANTCHARS );
else
base.WndProc( ref m );
}
}
}
//////////////////////////////////////////////////////////////
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
wrote in message news:5328599@discussion.autodesk.com...
I am having trouble starting a new line with the enter key in a text box on a palette. I can load text with enters and it displays the return on the next line but when i press enter it do not return to the next line. I have set:
Multiline =True
Wordwrap = false
AcceptsTab=true
AcceptsEnter=True