public UnknownParameterEditor() { InitializeComponent(); const int BUTTON_SIZE = 16; m_textBox = new MyTextBox(drawWindow1, () => new RectangleF(0, 0, drawWindow1.Width - BUTTON_SIZE, Math.Max(BUTTON_SIZE, drawWindow1.Height)), MyTextBox.InputFormEnum.None, null, x => MyTextBox.TextBoxBorderDaniel, 4, Fonts.Default); m_textBox.RequestedAreaChanged += () => { //Draw window is the whole control so we can just modify the control MinimumSize = new Size(BUTTON_SIZE, (int)m_textBox.RequestedArea.Height); Size size = m_textBox.RequestedArea.ToSize(); size.Width += BUTTON_SIZE; Size = size; }; m_textBox.RegisterCallbacks(this, drawWindow1); //MyTextBox.SetupCallbacks(drawWindow1, m_textBox); m_button = new CrossButton(() => new RectangleF(drawWindow1.Width - BUTTON_SIZE, (drawWindow1.Height - BUTTON_SIZE) / 2, BUTTON_SIZE, BUTTON_SIZE), () => { Remove.Execute(); m_remove = true; }, Pens.Magenta, Brushes.Magenta); m_button.RegisterCallbacks(this, drawWindow1); LastFocused = m_textBox; }