AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Stringrid ordnen

Offene Frage von "simon19881"
Ein Thema von simon19881 · begonnen am 12. Feb 2008 · letzter Beitrag vom 12. Feb 2008
 
bluesbear

Registriert seit: 14. Dez 2005
Ort: Hahnstätten
355 Beiträge
 
Delphi 2007 Enterprise
 
#5

Re: Stringrid ordnen

  Alt 12. Feb 2008, 18:17
Hallo Simon,
Zitat von simon19881:
Ps.: Ich bin delphi Neuling ^^
ok, eine Starthilfe gebe ich Dir. Kommentarlos
Delphi-Quellcode:
var i, a, b : Integer;
    tmpStr : String;
begin
  for i:=0 to Pred(StringGrid1.RowCount) do begin
    StringGrid1.Cells[0, i] := Chr(Ord('A') + (i div 4)) + IntToStr((i mod 4) + 1);
  end;
  for i:=0 to 300 do begin
    a := Random(Pred(StringGrid1.RowCount));
    b := Random(Pred(StringGrid1.RowCount));
    tmpStr := StringGrid1.Cells[0, a];
    StringGrid1.Cells[0, a] := StringGrid1.Cells[0, b];
    StringGrid1.Cells[0, b] := tmpStr;
  end;
end;
Rauskriegen, wie das funktioniert und den Bubblesort programmieren mußt Du nun aber selber
Klaus M. Hoffmann
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz