J'ai créé une fonction à cet effet, la voici :
void RenameComboBoxItem(ComboBox comboBox, int Index, string NewName,bool SelectRenamedItem)
{
string[] cItm = new string[comboBox.Items.Count];
int itemCount = comboBox.Items.Count;
bool ListCleared = false;
bool Looped = false;
ReLoop:
for (int i = 0; i < itemCount; i++)
{
if (ListCleared == false)
{
cItm[i] = comboBox.Items[i].ToString();
}
else
{
comboBox.Items.Add(cItm[i]);
}
}
if (Looped == false)
{
cItm[Index] = NewName;
comboBox.Items.Clear();
ListCleared = true;
Looped = true;
goto ReLoop;
}
if (SelectRenamedItem == true)
{
comboBox.SelectedIndex = Index;
}
}
Cela fonctionne parfaitement bien pour moi, et j'espère que cela fonctionnera aussi pour vous.