private void textName_TextChanged(object sender, EventArgs e) { this.selectedNpc.Name = this.textName.Text; int index = this.npcListBox.SelectedIndex; this.npcListBox.Items[index] = this.textName.Text; this.npcListBox.SelectedIndex = index; }