unit uSuche;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TFormSuche =
class(TForm)
pnSuche: TPanel;
imSuchebg: TImage;
imChosen3: TImage;
imChosen2: TImage;
imChosen1: TImage;
lbnachStudiengang: TLabel;
lbnachVorlesung: TLabel;
lbnachDozent: TLabel;
procedure FormCreate(Sender: TObject);
procedure lbnachStudiengangClick(Sender: TObject);
procedure imSuchebgClick(Sender: TObject);
private
pChosen, pChosenP, pChosenC: TPicture;
OptionChosen: Integer;
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
FormSuche: TFormSuche;
implementation
uses uMain;
{$R *.dfm}
procedure TFormSuche.FormCreate(Sender: TObject);
var s:
String;
begin
s := '
Graphics\Suche\';
DoubleBuffered := True;
pnSuche.DoubleBuffered := True;
pChosen := TPicture.Create;
pChosenP := TPicture.Create;
pChosenC := TPicture.Create;
pChosen.LoadFromFile(s + '
btChosen.png');
pChosenP.LoadFromFile(s + '
btChosenP.png');
pChosenC.LoadFromFile(s + '
btChosenC.png');
imSucheBG.Picture.LoadFromFile(s + '
SucheBG.png');
imChosen1.Picture := pChosenC;
imChosen2.Picture := pChosen;
imChosen3.Picture := pChosen;
lbnachDozent.Caption := '
nach' + #13 + '
Dozent';
OptionChosen := 1;
pnSuche.Width := 1000;
pnSuche.Height := 530;
pnSuche.Left := 12;
pnSuche.Top := 78;
pnSuche.Parent := FormMain
end;
procedure TFormSuche.lbnachStudiengangClick(Sender: TObject);
var a: Integer;
begin
a := (Sender
as TLabel).Tag;
TImage(FindComponent('
imChosen'+inttostr(a)).Picture := pChosenC;
TImage(FindComponent('
imChosen'+inttostr(OptionChosen)).Picture := pChosen;
OptionChosen := a;
FormNachStudiengang.ChangeStudiengang(1)
end;
end.