И еще в combobox не записывает с Tedit
Код:
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.ComCtrls;
type
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
LinkLabel1: TLinkLabel;
LinkLabel2: TLinkLabel;
LinkLabel3: TLinkLabel;
Memo1: TMemo;
DateTimePicker1: TDateTimePicker;
Button3: TButton;
procedure ComboBox1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ComboBox1.Items.Add ( 'новая строка' )
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ComboBox1.Items.Delete (ComboBox1.ItemIndex) ;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
Edit1.Text:=ComboBox1.Items.Strings[ComboBox1.ItemIndex];
end;
end.
Админ: Пользуемся тегами для оформления кода!