public KryptonRibbonGroupRichTextBox()
{
// Default fields
_visible = true;
_enabled = true;
_itemSizeCurrent = GroupItemSize.Medium;
_shortcutKeys = Keys.None;
_keyTip = "X";
// Create the actual text box control and set initial settings
_richTextBox = new KryptonRichTextBox();
_richTextBox.InputControlStyle = InputControlStyle.Ribbon;
_richTextBox.AlwaysActive = false;
_richTextBox.MinimumSize = new Size(121, 0);
_richTextBox.MaximumSize = new Size(121, 0);
_richTextBox.Multiline = false;
_richTextBox.ScrollBars = RichTextBoxScrollBars.None;
_richTextBox.TabStop = false;
// Hook into events to expose via our container
_richTextBox.AcceptsTabChanged += new EventHandler(OnRichTextBoxAcceptsTabChanged);
_richTextBox.TextChanged += new EventHandler(OnRichTextBoxTextChanged);
_richTextBox.HideSelectionChanged += new EventHandler(OnRichTextBoxHideSelectionChanged);
_richTextBox.ModifiedChanged += new EventHandler(OnRichTextBoxModifiedChanged);
_richTextBox.MultilineChanged += new EventHandler(OnRichTextBoxMultilineChanged);
_richTextBox.ReadOnlyChanged += new EventHandler(OnRichTextBoxReadOnlyChanged);
_richTextBox.GotFocus += new EventHandler(OnRichTextBoxGotFocus);
_richTextBox.LostFocus += new EventHandler(OnRichTextBoxLostFocus);
_richTextBox.KeyDown += new KeyEventHandler(OnRichTextBoxKeyDown);
_richTextBox.KeyUp += new KeyEventHandler(OnRichTextBoxKeyUp);
_richTextBox.KeyPress += new KeyPressEventHandler(OnRichTextBoxKeyPress);
_richTextBox.PreviewKeyDown += new PreviewKeyDownEventHandler(OnRichTextBoxPreviewKeyDown);
_richTextBox.LinkClicked += new LinkClickedEventHandler(OnRichTextBoxLinkClicked);
_richTextBox.Protected += new EventHandler(OnRichTextBoxProtected);
_richTextBox.SelectionChanged += new EventHandler(OnRichTextBoxSelectionChanged);
_richTextBox.HScroll += new EventHandler(OnRichTextBoxHScroll);
_richTextBox.VScroll += new EventHandler(OnRichTextBoxVScroll);
// Ensure we can track mouse events on the text box
MonitorControl(_richTextBox);
}