Autor Beitrag
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.02.07 20:20 
Deine Lösung ist im Anhang?

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.02.07 20:22 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
var i, j : Integer;
begin
 If Savedialog1.Execute Then
 begin
  daten := TStringList.Create;
  for j := 1 to Stringgrid1.colcount do
  begin
   for i := 1 to StringGrid.rowcount do
   begin
    daten.Add(StringGrid1.Cells[j-1,i-1]);
   end; 
  end;
  daten.SaveToFile(SaveDialog1.FileName);
  daten.Free;
 end;
end;

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Mi 21.02.07 20:29 
achso oh entschuldigung ;)
jetz speichert er es sO:

Englisch
car
tree
food
train
political

//hier lässt er dann die anderen 95 spalten, die leer sind



Deutsch
auto
baum
essen
zug
politisch
//und hier ebenfalls


wie kann man dem denn beibringen, das er die zeilen, wo nichts drin steht, nicht speichern soll?


mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 21.02.07 20:35 
Indem Du vor dem "Add" prüfst, ob was in "Cells" drin steht. Falls ja, kannst du das "Add" durchführen, sonst eben nicht.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mi 21.02.07 20:36 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
var i, j : Integer;
begin
 If Savedialog1.Execute Then
 begin
  daten := TStringList.Create;
  for j := 1 to Stringgrid1.colcount do
  begin
   for i := 1 to StringGrid.rowcount do
   begin
    if length(StringGrid.cells[j-1, i-1]) > 1 then
     daten.Add(StringGrid1.Cells[j-1,i-1]);
   end; 
  end;
  daten.SaveToFile(SaveDialog1.FileName);
  daten.Free;
 end;
end;


Moderiert von user profile iconjasocul: Delphi-Tags hinzugefügt

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Do 22.02.07 14:27 
ah ok es klappt danke schön.

wär so eine speichervariante überhaupt geeignet für ein vokabelprogramm oder sollte man es vllt in einer datei speichern die englisch und deutsch trennt?würde jemand vllt so eine datei kennen?

mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 22.02.07 14:53 
Ich würde sagen Du speicherst Deutsch und English in zwei Textdateien und arbeitest dann mit zwei Stringlisten.
Dürfte wohl am einfachsten gehn, aber vieleicht hatt ja noch wer andere Ideen.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 22.02.07 14:57 
Warum nicht per INI-File?

ausblenden Quelltext
1:
2:
3:
 [Vokalbular]
 Haus=house
 Kate=cat


Zum Auslesen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
 for i:= 1 to Sektionszaehler do
 begin
  INI.Auslesen;
 end;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Do 22.02.07 18:50 
soory aber INI dateien hab ich mir schon viele tutorials durchgelesen habs aber noch nie gerraft :) bin wohl einfach zu dumm dafür ;)
ich probiers mal mit 2 textdateien trotzdem danke für die tipps

mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 23.02.07 10:32 
user profile iconmarvin521993 hat folgendes geschrieben:
soory aber INI dateien hab ich mir schon viele tutorials durchgelesen habs aber noch nie gerraft :) bin wohl einfach zu dumm dafür ;)
ich probiers mal mit 2 textdateien trotzdem danke für die tipps

mfg


Kleines Beispiel mit Ini, vieleicht kannst Du's gebrauchen.
Einloggen, um Attachments anzusehen!
_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Fr 23.02.07 14:04 
die exe sollte da auch noch bei sein sonst kann ichs nich starten

mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 23.02.07 14:09 
user profile iconmarvin521993 hat folgendes geschrieben:
die exe sollte da auch noch bei sein sonst kann ichs nich starten

mfg

Hast Du kein Delphi, alle zum Compilieren benötigten Dateien sind anbei.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Fr 23.02.07 14:20 
doch delphi 7 personal
den quelltext kann ich ja auch lesen aber das programm nicht compilieren

mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Fr 23.02.07 14:32 
Weiss zwar nicht was da nicht klappen soll, hab auch Delphi7
Exe im Anhang.
Einloggen, um Attachments anzusehen!
_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Fr 23.02.07 14:34 
Du weißt aber schon, dass du Project1.dpr und nicht Unit1.pas öffnen musst? :wink:

Gruß

Saubäär
marvin521993 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 172



BeitragVerfasst: Fr 23.02.07 14:46 
wär das dann so in etwa richtig aber was muss ich ändern?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TFormvokverwalt.SpeedButton1Click(Sender: TObject);
var i : Integer;
 begin
  for i := 0 to 100 do
    begin
      Ini.WriteInteger(Stringgrid1.Cells[i,0]);
      Ini.WriteInteger(Stringgrid1.Cells[i,1]);
    end;
 end;




saubäär: ja klatr weiss ich das soooooooooooo dumm bin ich jetz auch nich ;)

mfg

_________________
Marvin Tappert
Besiege einen Feind, und du erhälst 100 Neue!!!!Keine bösen Sprüche bin noch Anfänger