はじめまして、こんばんは。
TurboDelphiでプログラム勉強中です。
今、RadioButtonとテキストボックスの連携に悩んでいます。
特定のRadioButtonを選択したときのみ、テキストボックスを
入力可能にしたいのですが、実現方法をおしえてください。
よろしくお願いします。
TRadioGroupだと、
onClickイベントで、
if ItemIndex = 目的の番号 then
Edit1.ReadOnly := true
else
Edit1.ReadOnly := false;
TRadioButtonだと、
if 目的のTRadioButton.checked then
Edit1.ReadOnly := true
else
Edit1.ReadOnly := false;
でどうでしょう。
HOtaさん
ありがとうございます。
TRadioButtonの方で実現できました。
Edit1.ReadOnly := RadioButton1.checked;
でもいいな。
ツイート | ![]() |