unit EditQuestionUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, CheckLst, Buttons;

type
  TEditQuestionForm = class(TForm)
    Panel1: TPanel;
    Image1: TImage;
    Button1: TButton;
    Button2: TButton;
    ResultListBox: TCheckListBox;
    Label1: TLabel;
    QuestionEdit: TEdit;
    Label3: TLabel;
    NewResultButton: TSpeedButton;
    SpeedButton1: TSpeedButton;
    procedure FormShow(Sender: TObject);
    procedure NewResultButtonClick(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  EditQuestionForm: TEditQuestionForm;

implementation

{$R *.dfm}

procedure TEditQuestionForm.FormShow(Sender: TObject);
begin
 Image1.Picture.Bitmap.LoadFromFile(ExtractFilePath(Application.ExeName)+'logo.bmp');
end;

procedure TEditQuestionForm.NewResultButtonClick(Sender: TObject);
var
 Str:String;
begin
 Str:='';
 if InputQuery('Новый ответ', 'Введите текст ответа:', Str) then
  ResultListBox.Items.Add(Str);
end;

procedure TEditQuestionForm.SpeedButton1Click(Sender: TObject);
begin
 if ResultListBox.ItemIndex<>-1 then
  ResultListBox.Items.Delete(ResultListBox.ItemIndex);
end;

end.
