CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Posts
    14

    Making a text box visible

    I'm attempting a program and want to know if there is a way to make a text box only visible when a check box is checked and invisible when not checked. Would it be the same as enabling a command button.


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Making a text box visible

    Hi...
    At the time of loading you make text box invisible by setting

    text1.visible = false



    you can also do so by property setting.
    In the check box click event if the value is 1 then make the textbox visible otherwise make it invisible

    if check1.value = 1 then
    text1.visible = true
    end if
    if check1.value = 0 then
    text1.visible = false
    end if



    Please try this out.



    Santulan

  3. #3
    Guest

    Re: Making a text box visible

    A simpler way is

    Sub Check1_Click()
    ' Display text1 if the box is checked
    Text1.Visible = Check1.Value
    End Sub


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured