Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionbegin noLigne := 1; Memo2.Clear; if StringGrid2.Cells[3, noLigne] = '6' then Memo2.Text:='blablabla' else Memo2.Text:='htrhtrh';
quand je test en debug sa me mets 3=3
colonne n°3 => indice=2
if StringGrid2.Cells[3, noLigne] = '6' then
MaVar:= StringGrid2.Cells[3, noLigne]; if MaVar = '6' then
inc(noLigne); ?
begin noligne := 0; inc(noligne); Memo2.Clear; if StringGrid2.Cells[3, noligne] = '8' then Memo2.Text:=' vol n° : Erreur trop de ballon utilisé' else Memo2.Text:='Autre problème';
begin //memo Memo2.Clear; for noligne:=1 to StringGrid2.RowCount-1 do begin if StringGrid2.Cells[3, noligne] = '7' then Memo2.Text:= Memo2.Text + ' vol n° : Erreur trop de ballon utilisé'#13#10 else Memo2.Text := Memo2.Text + 'vol n° : Autre problème'#13#10; end;
Memo2.Text:= Memo2.Text + ' vol n°' + IntToStr(noligne) + ': Erreur trop de ballon utilisés'#13#10
Memo2.Lines.Add('vol n°' + IntToStr(noligne) + ': Erreur trop de ballon utilisés');
Memo2.Lines[0]:= 'Une nouvelle valeur';
begin Memo2.Clear; for noligne:=1 to StringGrid2.RowCount-1 do begin if StringGrid2.Cells[3, noligne] = '9' then Memo2.Text:= Memo2.Text + StringGrid2.Cells[0, noligne] + ': Erreur trop de ballon utilisés'#13#10 else Memo2.Text := Memo2.Text + StringGrid2.Cells[0, noligne] + ': Autre problème'#13#10;
begin Memo2.Clear; for noligne:=1 to StringGrid2.RowCount-1 do begin if StrToIntDef(StringGrid2.Cells[3, noligne], 0) > 7 then Memo2.Text:= Memo2.Text + StringGrid2.Cells[0, noligne] + ': Erreur trop de ballon utilisés'#13#10 else if StringGrid2.Cells[4, noligne] <> 'On' then Memo2.Text := Memo2.Text + StringGrid2.Cells[0, noligne] + ': Le processus n est pas activé'#13#10 else Memo2.Text := Memo2.Text + StringGrid2.Cells[0, noligne] + ': Autre problème'#13#10; end; end; end;