unit frmneuerEintrag;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, Buttons, ExtCtrls, jpeg;
type
Tneuer_Eintrag =
class(TForm)
imgLogo: TImage;
lblUberschrift: TLabel;
lbl1: TLabel;
lbledtPNr: TLabeledEdit;
mmoBetreff: TMemo;
lbl4: TLabel;
dtp1: TDateTimePicker;
lbl_Datum: TLabel;
grp1: TGroupBox;
btn3: TBitBtn;
btn4: TBitBtn;
grp2: TGroupBox;
btn1: TBitBtn;
btn2: TBitBtn;
lbledtZuarbeit: TLabeledEdit;
lbledtAblage: TLabeledEdit;
dtpSchreiben: TDateTimePicker;
lbl2: TLabel;
dtpPost: TDateTimePicker;
lbl3: TLabel;
btnHinzu: TBitBtn;
btnAbbrech: TBitBtn;
procedure AddNewLabeledEdit(aLeft, aTop, aWidth: Integer;
const aCaption, aName, aParent:
string);
procedure FormShow(Sender: TObject);
procedure btnAbbrechClick(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
Postart: Integer;
end;
var
neuer_Eintrag: Tneuer_Eintrag;
implementation
{$R *.dfm}
procedure TneuerEintrag.AddNewLabeledEdit(aLeft, aTop, aWidth: Integer;
const aCaption, aName, aParent:
string);
var
lbledt: TLabeledEdit;
begin
lbledt:=TLabeledEdit.Create(self);
lbledt.Left:=aLeft;
lbledt.Top:=aTop;
lbledt.Width:=aWidth;
lbledt.EditLabel.Caption:=aCaption;
lbledt.
Name:='
lbledt'+aName;
lbledt.Parent:=aParent;
lbledt.Font.
Name:='
Arial';
lbledt.EditLabel.Font.
Name:='
Arial';
lbledt.Font.Size:=9;
lbledt.EditLabel.Font.Size:=9;
lbledt.Show;
end;
procedure Tneuer_Eintrag.btnAbbrechClick(Sender: TObject);
begin
Close;
end;
procedure Tneuer_Eintrag.FormShow(Sender: TObject);
begin
if (Postart=1)
then
begin
lbl_Datum.Caption:='
Datum Posteingang:*';
AddNewLabeledEdit(16,86,121,'
Anrede:','
ABS_Anrede',grp1);
end;
end;