Radiobutton work?
-
I want to do a little program with "Yes" and "No" answers through.
radiobutton
♪For example, in shape
1 label
♪2 radiobutton
(now)1 button
(hereinafter).I'm writing in label.
"У тебя иномарка"?
Replies -Да и Нет
♪ On the clickДа
the question is:"Дорогая"?
responses"Да и Нет"
respectively, if pressed"Нет"
Then there's another question, etc.I don't want to create a lot of radiobuttons, but I have to get a result at the end, depending on the answers.
How do you do that?
Изначально procedure TForm1.FormCreate(Sender: TObject); begin Title.Caption := 'У тебя иномарка?'; end;
procedure TForm1.NextClick(Sender: TObject);
begin
if(Yes.Checked) then
Title.Caption := 'Honda?';
if(No.Checked) then
Title.Caption := 'Москвич?';
end;
Well, depending on these options, radiobutton should go again and ask other questions.
-
You're hanging on to the event of a knopok strike. Yes or No, the following code is:
label.caption := questions(index); index := index + 1;
In question, we need to post a list of questions. Don't forget initializing the index. ♪ ♪