17 Ağustos 2011 Çarşamba

Çalışma sırasında proğram içinden kod oluşturma


Var Label1: TLabel ; ComboBox1:TComboBox;
SpinEdit1:TSpinEdit; DateTimePicker1:TDateTimePicker;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
Begin
// Label1 Bileseni Olusturuldu
Label1 := TLabel.Create(self) ;
With Label1 Do Begin
Parent:=Self;
Left := 5;
Top := 70;
Width := 70;
Height := 13;
Alignment := taRightJustify;
AutoSize := False;
Caption := 'Listeler:';
end;

// ComboBox1 Bileseni Olusturuldu
ComboBox1:=TComboBox.Create(se lf);
With ComboBox1 Do Begin
Parent:=Self;
Left := 85;
Top := 65;
Width := 145;
Height := 21;
ItemHeight := 13;
TabOrder := 3;
Text := 'Liste1';
Items.Clear;
Items.Add('Liste1');
Items.Add('Liste2');
Items.Add('Liste3');;
end;

// DateTimePicker1 Bileseni Olusturuldu
DateTimePicker1:=TDateTimePick er.Create(self);
With DateTimePicker1 Do Begin
Parent:=Self;
Left := 85;
Top := 90;
Width := 146;
Height := 21;
CalAlignment := dtaLeft;
Date := 36964.028340625;
Time := 36964.028340625;
DateFormat := dfShort;
DateMode := dmComboBox;
Kind := dtkDate;
ParseInput := False;
TabOrder := 4;
end;
end;

Hiç yorum yok:

Yorum Gönder