In meinem Kommentar "TListBox Scrollbar", hat man mir vorgeschlagen es mit Stringgrid zu machen?? Wie soll de das gehen?
Announcement
Collapse
No announcement yet.
Stringgrid???
Collapse
X
-
das funktionniert mit einer listbox perfekt, wie kann ich das jetzt für eine StringGrid machen???
{
TStringList *List=new TStringList();
List->Clear();
List->LoadFromFile(datei);
String str=List->Text;
int posstart, posende;
TStrings *TempList = new TStringList();
String ex, ex2 = "0" , ex3;
while (ex2 != ""){
posstart = str.Pos("<Option id=\"")+12;
posende = str.Pos("\">");
ex3 = str.SubString(posstart,posende-posstart);
if (ex3 == "") {
break;
}
posstart = str.Pos("<Bezeichnung>")+13;
posende = str.Pos("</Bezeichnung>");
ex = str.SubString(posstart,posende-posstart);
posstart = str.Pos("<AnbieterPreis>")+15;
posende = str.Pos("</AnbieterPreis>");
ex2 = str.SubString(posstart,posende-posstart);
str = str.Delete(1,posende);
if (ex.Length() >= 25) {
ex = ex.Delete(25,100);
ex = ex + "...";
}
ex = ex + " " + ex2 + " " +
" $" + ex3 + "§";
TempList->Add(ex);
}
if (TempList->Count == 0) {
ex = "Das Produkt wurde leider nicht gefunden.";
TempList->Add(ex);
ListBox1->Items->AddStrings(TempList);
} else {
ListBox1->Items->AddStrings(TempList);
}
delete TempList;
Comment
Comment