public UpDownBase()
{
_UpDownAlign = LeftRightAlignment.Right;
InternalBorderStyle = BorderStyle.Fixed3D;
spnSpinner = new UpDownSpinner(this);
txtView = new UpDownTextBox (this);
txtView.ModifiedChanged += new EventHandler(OnChanged);
txtView.AcceptsReturn = true;
txtView.AutoSize = false;
txtView.BorderStyle = BorderStyle.None;
txtView.Location = new System.Drawing.Point(0, 0);
txtView.TabIndex = TabIndex;
spnSpinner.Width = 16;
spnSpinner.Dock = DockStyle.Right;
txtView.Dock = DockStyle.Fill;
SuspendLayout ();
Controls.Add (txtView);
Controls.Add (spnSpinner);
ResumeLayout ();
Height = PreferredHeight;
base.BackColor = txtView.BackColor;
TabIndexChanged += new EventHandler (TabIndexChangedHandler);
txtView.KeyDown += new KeyEventHandler(OnTextBoxKeyDown);
txtView.KeyPress += new KeyPressEventHandler(OnTextBoxKeyPress);
// txtView.LostFocus += new EventHandler(OnTextBoxLostFocus);
txtView.Resize += new EventHandler(OnTextBoxResize);
txtView.TextChanged += new EventHandler(OnTextBoxTextChanged);
// So the child controls don't get auto selected when the updown is selected
auto_select_child = false;
SetStyle(ControlStyles.FixedHeight, true);
SetStyle(ControlStyles.Selectable, true);
SetStyle (ControlStyles.Opaque | ControlStyles.ResizeRedraw, true);
SetStyle (ControlStyles.StandardClick | ControlStyles.UseTextForAccessibility, false);
}
#endregion