المشاركات : 111
المواضيع 37
:
: 0
الإنتساب : Mar 2013
السلام عليم
اخوان بارك لله بيكم
كيف يتم ترتيب العناصر في الليست فيو
حسب الاسم و حسب الحجم ...لخ
و باك الله بالجيع
سبحان الله و بحمده سبحان الله العظيم
المشاركات : 24
المواضيع 0
:
: 0
الإنتساب : May 2013
استعملت في هذا الكود StringGrid1
كود :
Var petit, i, j : Integer;
Str: String;
Begin
For i := 1 to StringGrid1.RowCount -1 Do
Begin
petit := i;
For j := i to StringGrid1.RowCount -1 Do
Begin
If StringGrid1.Cells[1,j] > StringGrid1.Cells[1,petit]
then petit := j;
End;
Str := StringGrid1.Cells[1,i]; //
StringGrid1.Cells[1,i] := StringGrid1.Cells[1,petit];
StringGrid1.Cells[1,petit] := Str;
End;
End;