Bueno, no existe ningún bug. He hecho una prueba con delphi 6:
Código Delphi
[-]procedure TForm1.FormActivate(Sender: TObject);
begin
ListBox1.Items.Add('A');
ListBox1.Items.Add('AB');
ListBox1.Items.Add('AC');
ListBox1.Items.Add('B');
ListBox1.Items.Add('BA');
ListBox1.Items.Add('C');
ListBox1.Sorted := true;
end;
end.
si no colocas ListBox1.Sorted := true; funciona como tu dices.
En definitiva tu codigo c tiene algún error y ademas falta ListBox1->Sorted = true;
Sería algo así:
Código:
void __fastcall TForm1::FormActivate(TObject *Sender)
{
ListBox1->Items->Add("A");
ListBox1->Items->Add("AB");
ListBox1->Items->Add("AC");
ListBox1->Items->Add("B");
ListBox1->Items->Add("BA");
ListBox1->Items->Add("C");
ListBox1->Sorted=true;
}
Aquí te dejo el ejemplo:
Saludos.
EDITO: mira esto también:
Código:
void __fastcall TForm1::FormActivate(TObject *Sender)
{
TStringList *Lista = new TStringList;
Lista->Add("A");
Lista->Add("AB");
Lista->Add("AC");
Lista->Add("B");
Lista->Add("BA");
Lista->Add("C");
Lista->Sorted = true;
ListBox1->Items->Text = Lista->Text;
// Prueba con esta línea y sin ella:
ListBox1->Sorted = true;
delete Lista;
}