Einzelnen Beitrag anzeigen

CR3ATiV3

Registriert seit: 22. Mai 2011
30 Beiträge
 
#1

image verschwindet bei eingabe bzw. klick?

  Alt 31. Mai 2011, 18:02
hallo, ich möchte ein image verwschwinden lassen wenn in meinem edit feld etwas angezeigt wird, dass durch einen klick auf einen radiobutton geschieht ...
mit was für einen quelltext mach ich das?
wäre schön wenn man mir helfen könnte

Delphi-Quellcode:
unit Unit3;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ComCtrls, Buttons, ExtCtrls, types;

type

  { TForm3 }

  TForm3 = class(TForm)
    AbbrechenBitBtn1: TBitBtn;
    AbbrechenBitBtn2: TBitBtn;
    AbbrechenBitBtn3: TBitBtn;
    AbbrechenBitBtn4: TBitBtn;
    AbbrechenBitBtn5: TBitBtn;
    ALabel2: TLabel;
    ALabel3: TLabel;
    ALabel4: TLabel;
    ALabel5: TLabel;
    AntwortARadioButton2: TRadioButton;
    AntwortARadioButton3: TRadioButton;
    AntwortARadioButton4: TRadioButton;
    AntwortARadioButton5: TRadioButton;
    AntwortBRadioButton3: TRadioButton;
    AntwortBRadioButton4: TRadioButton;
    AntwortBRadioButton5: TRadioButton;
    AntwortBRadioButton6: TRadioButton;
    AntwortCRadioButton4: TRadioButton;
    AntwortCRadioButton5: TRadioButton;
    AntwortCRadioButton6: TRadioButton;
    AntwortCRadioButton7: TRadioButton;
    AntwortDRadioButton5: TRadioButton;
    AntwortDRadioButton6: TRadioButton;
    AntwortDRadioButton7: TRadioButton;
    AntwortDRadioButton8: TRadioButton;
    BLabel3: TLabel;
    BLabel4: TLabel;
    BLabel5: TLabel;
    BLabel6: TLabel;
    CLabel4: TLabel;
    CLabel5: TLabel;
    CLabel6: TLabel;
    CLabel7: TLabel;
    DLabel5: TLabel;
    DLabel6: TLabel;
    DLabel7: TLabel;
    DLabel8: TLabel;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    FrageaLabel2: TLabel;
    FrageaLabel3: TLabel;
    FrageaLabel4: TLabel;
    FrageaLabel5: TLabel;
    Image13: TImage;
    Image14: TImage;
    Image15: TImage;
    Image16: TImage;
    Image17: TImage;
    Image18: TImage;
    Image19: TImage;
    Image20: TImage;
    Image21: TImage;
    Image22: TImage;
    Image23: TImage;
    Image24: TImage;
    Image25: TImage;
    Image26: TImage;
    Image27: TImage;
    ImageList1: TImageList;
    weiterBitBtn2: TBitBtn;
    Edit1: TEdit;
    FrageaLabel1: TLabel;
    GroupBox1: TGroupBox;
    ALabel1: TLabel;
    BLabel2: TLabel;
    CLabel3: TLabel;
    DLabel4: TLabel;
    Quiz: TPageControl;
    Level1: TTabSheet;
    Level2: TTabSheet;
    Level3: TTabSheet;
    Level4: TTabSheet;
    Level5: TTabSheet;
    AntwortARadioButton1: TRadioButton;
    AntwortBRadioButton2: TRadioButton;
    AntwortCRadioButton3: TRadioButton;
    AntwortDRadioButton4: TRadioButton;
    weiterBitBtn3: TBitBtn;
    weiterBitBtn4: TBitBtn;
    weiterBitBtn5: TBitBtn;
    weiterBitBtn6: TBitBtn;
    procedure AbbrechenBitBtn1Click(Sender: TObject);
    procedure AntwortARadioButton1Change(Sender: TObject);
    procedure AntwortBRadioButton2Change(Sender: TObject);
    procedure AntwortCRadioButton3Change(Sender: TObject);
    procedure AntwortDRadioButton4Change(Sender: TObject);
    procedure weiterBitBtn2Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.lfm}

{ TForm3 }


{ TForm3 }

procedure TForm3.AntwortARadioButton1Change(Sender: TObject);
begin
    Edit1.Caption:= 'Richtig! :)';
    Edit1.Font.Color:= clgreen;
end;

procedure TForm3.AbbrechenBitBtn1Click(Sender: TObject);
begin
  close;
end;

procedure TForm3.AntwortBRadioButton2Change(Sender: TObject);
begin
   Edit1.Caption:= 'Leider falsch! :(';
   Edit1.Font.Color:= clred;
end;

procedure TForm3.AntwortCRadioButton3Change(Sender: TObject);
begin
  Edit1.Caption:= 'Versuche es nochmal!';
  Edit1.Font.Color:= clred;
end;

procedure TForm3.AntwortDRadioButton4Change(Sender: TObject);
begin
  Edit1.Caption:= 'Falsch!';
  Edit1.Font.Color:= clred;
end;

procedure TForm3.weiterBitBtn2Click(Sender: TObject);
begin
  Edit1.Caption:= 'Super! Du bist hast das Level gschafft! :)';
  Edit1.Font.Color:= clblack;
  Level2.show;
end;

end.

Geändert von mkinzler ( 1. Jun 2011 um 06:59 Uhr) Grund: Code-Tag durch Delphi-Tag ersetzt
  Mit Zitat antworten Zitat