RadioButtonとテキストボックスの連携について

解決


ボンビー  2007-02-13 11:18:41  No: 24881

はじめまして、こんばんは。
TurboDelphiでプログラム勉強中です。

今、RadioButtonとテキストボックスの連携に悩んでいます。

特定のRadioButtonを選択したときのみ、テキストボックスを
入力可能にしたいのですが、実現方法をおしえてください。

よろしくお願いします。


HOta  2007-02-13 16:41:23  No: 24882

TRadioGroupだと、
onClickイベントで、
if ItemIndex = 目的の番号 then
  Edit1.ReadOnly := true
else
  Edit1.ReadOnly := false;

TRadioButtonだと、

if 目的のTRadioButton.checked then
  Edit1.ReadOnly := true
else
  Edit1.ReadOnly := false;

でどうでしょう。


ボンビー  2007-02-14 01:11:03  No: 24883

HOtaさん
ありがとうございます。

TRadioButtonの方で実現できました。


HOta  2007-02-14 16:22:10  No: 24884

Edit1.ReadOnly := RadioButton1.checked;
でもいいな。


※返信する前に利用規約をご確認ください。

※Google reCAPTCHA認証からCloudflare Turnstile認証へ変更しました。






  このエントリーをはてなブックマークに追加