public void OnPaint(PaintEventArgs e, bool enabled, bool multiple) { TextBoxState textBoxState; if (!enabled) textBoxState = TextBoxState.Disabled; else if (this.focused) textBoxState = TextBoxState.Focus; else if (this.hovered) textBoxState = TextBoxState.Hot; else textBoxState = TextBoxState.Normal; if (this.readOnly) textBoxState |= TextBoxState.ReadOnlyFlag; ControlRenderer.DrawTextField( e.Graphics, rect, text, ControlRenderer.DefaultFont, ControlRenderer.ColorText, multiple ? ControlRenderer.ColorMultiple : ControlRenderer.ColorVeryLightBackground, textBoxState, TextBoxStyle.Sunken, this.scroll, (this.selectionLength != 0 || this.cursorVisible) ? this.cursorIndex : -1, this.selectionLength); }