private void OnTextBoxMouseUp(object sender, MouseEventArgs e)
{
if ((_richTextBox != null) && (e.Button == MouseButtons.Left))
{
// Get any component associated with the current mouse position
Component component = _richTextBox.DesignerComponentFromPoint(new Point(e.X, e.Y));
if (component != null)
{
// Force the layout to be update for any change in selection
_richTextBox.PerformLayout();
// Select the component
ArrayList selectionList = new ArrayList();
selectionList.Add(component);
_selectionService.SetSelectedComponents(selectionList, SelectionTypes.Auto);
}
}
}