using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows.Forms.Design; namespace ScollableToolStripTextBox { [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)] public class ScrollableToolStripTextBox : MyCustomToolStripControlHost { public ScrollableToolStripTextBox() : base(CreateControlInstance()) { } public TextBox TextBox { get { return Control as TextBox; } } private static Control CreateControlInstance() { return new TextBox(); } /* public ScrollableToolStripTextBox() : base(new TextBox()) { } [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] [TypeConverter(typeof(ExpandableObjectConverter))] public TextBox TextBox { get { return Control as TextBox; } } public static implicit operator ToolStripTextBox(ScrollableToolStripTextBox scrollableToolStripTextBox) { return (ToolStripTextBox)scrollableToolStripTextBox; }*/ } }