제가 알기로는 그런 준비된 함수는 없는 것 같습니다..
대신 아래와 같이 간단한 함수의 예제를 드리니..
참고하시기 바랍니다..
From 류..
---------
implementation
{$R *.DFM}
Procedure ShuffleListBox(ListBox:TListBox; No:Integer);
Var
stTemp : String;
Loop, iNo : Integer;
Begin
For Loop:= 1 to No do
Begin
iNo:= Round(Random(ListBox.Items.Count));
stTemp:= ListBox.Items.Strings[iNo];
ListBox.Items.Delete(iNo);
ListBox.Items.Insert(0, stTemp);
End;
End;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShuffleListBox(ListBox1, 100);
end;
end.
|