Einzelnen Beitrag anzeigen

Langa

Registriert seit: 10. Apr 2006
Ort: Dresden
24 Beiträge
 
Delphi 6 Enterprise
 
#5

Re: Ja/nein Abfrage und dann malen

  Alt 8. Jun 2006, 21:59
hab das ja in der art gemacht
Delphi-Quellcode:
    if (z > 200) and (MessageDlg('Das Bild geht über das Fenster hinaus!' + #13
      + #10 +
      'Soll wirklich gemalt werden?', mtInformation, [mbYes, mbNo], 0) <> mrYes)
        then
    begin
      Edit1.text := '50';
      Edit2.Text := '10';
      Start.Visible := true;
      Stop.Visible := false;
      with bitmap1.Canvas do
      begin
        ellipse(x0 - r1, y0 - r1, x0 + r1, y0 + r1); //zentraler Kreis
        ellipse(x0 + r1, y0 + r2, x0 + r1 + 2 * r2, y0 - r2); //außen Kreis
        pen.Color := clred;
        ellipse(x0 + r1 + 2, y0 + 2, x0 + r1 - 2, y0 - 2);
        pen.Color := clblack;
      end;
      paintbox.Canvas.Draw(0, 0, bitmap1);
    end
    else
    begin
      Pause1.Visible := true;
      Pause2.Visible := false;
      ComboBox.Enabled := false;
      edit1.ReadOnly := true;
      edit2.ReadOnly := true;
      with Bitmap1.Canvas do
      begin
        Ellipse(x0 - r1, y0 - r1, x0 + r1, y0 + r1); // zentraler Kreis
        Ellipse(x0 + r1, y0 + r2, x0 + r1 + 2 * r2, y0 - r2); // außen Kreis
        Pen.Color := clred;
        Ellipse(x0 + r1 + 2, y0 + 2, x0 + r1 - 2, y0 - 2);
        Pen.Color := clblack;
        paintbox.Canvas.Draw(0, 0, bitmap1);
      end;
    end;
das ist das stück

es geht mir darum das wenn es ungleich YES ist, dann wird trotzdem das else gezeichnet das will ich aj nicht


Delphi-Quellcode:
if (z > 200) and (MessageDlg('Das Bild geht über das Fenster hinaus!' + #13
      + #10 +
      'Soll wirklich gemalt werden?', mtInformation, [mbYes, mbNo], 0) <> mrYes)
        then
das ist das stück was sagt wenn no dann nich malen sonst malen

edit:

Achso man muss ja auch beachten das ich ne abfrage hab das nur zahlen eingegeben werden in die edit felder

Hoffe mir kann jemand helfen
  Mit Zitat antworten Zitat