Enable / Disable text box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 5070707@gmail.com

    #1

    Enable / Disable text box

    Hi all,
    I have a check box and a text box.
    incase of the checkbox is checked i want the text box to be disabled.
    i wrote as followed:

    If cbxNewPc.Checke d = True Then
    tbxOldSerial.En abled = False
    End If

    Works like magic.
    But, what happens if the user uncheck the checkbox...how do i re-
    enable the text box?

    Thanks,
    50

  • 5070707@gmail.com

    #2
    Re: Enable / Disable text box

    On May 7, 9:08 pm, 5070...@gmail.c om wrote:
    Hi all,
    I have a check box and a text box.
    incase of the checkbox is checked i want the text box to be disabled.
    i wrote as followed:
    >
    If cbxNewPc.Checke d = True Then
    tbxOldSerial.En abled = False
    End If
    >
    Works like magic.
    But, what happens if the user uncheck the checkbox...how do i re-
    enable the text box?
    >
    Thanks,
    50
    Welp, i figured that "Brainer" alone :)
    Cheers everyone!

    Comment

    • Johnny Jörgensen

      #3
      Re: Enable / Disable text box

      Next time, just try:

      tbxOldSerial.En abled = cbxNewPc.Checke d

      in your cbxNewPc CheckedChanged event.

      Much easier.

      Cheers,
      Johnny J.



      <5070707@gmail. comwrote in message
      news:1178564883 .437580.104390@ l77g2000hsb.goo glegroups.com.. .
      Hi all,
      I have a check box and a text box.
      incase of the checkbox is checked i want the text box to be disabled.
      i wrote as followed:
      >
      If cbxNewPc.Checke d = True Then
      tbxOldSerial.En abled = False
      End If
      >
      Works like magic.
      But, what happens if the user uncheck the checkbox...how do i re-
      enable the text box?
      >
      Thanks,
      50
      >

      Comment

      Working...