private void BeginRename(ExplorerObjectListViewItem item) { if (item == null || !(item.ExplorerObject is IExplorerObjectRenamable)) { return; } RenameTextBox box = new RenameTextBox(item.ExplorerObject as IExplorerObjectRenamable); box.Bounds = new Rectangle(16, item.Bounds.Y, item.Bounds.Width - 16, item.Bounds.Height); box.Text = item.Text; listView.Controls.Add(box); box.Visible = true; box.Focus(); box.Select(0, item.Text.Length); }
public RenameForm() { InitializeComponent(); RenameTextBox.Select(); }