dcsimg
Results 1 to 7 of 7

Thread: Text boxes that allow user input

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2019
    Posts
    4

    Text boxes that allow user input

    Hello all. I have been working on a genealogy program in VB and would like the user to be able to add or edit comments that appear on the various forms. This is a program for my own family so each form will have the picture of a relative and a "text" box below it that I will add data to but which I want the user to be able to edit in the run time version. Just using a TextBox doesn't work as the user cannot edit it. Any suggestions?

    Thanks in advance.

    Roncc

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    33,985

    Re: Text boxes that allow user input

    Of course you can use a TextBox for editing text. That's what they are there for. You can set them to Read Only, but they are not set that way by default. Therefore, there must be some reason why the user is not able to edit in your case, and the way the question was asked, there could be multiple answers to that.

    1) The user may not be able to change the text in the textbox (the control is disabled or Read Only).

    2) The user can change the text in the textbox, but the changes aren't saved...which is a different issue.

    So, the first question is which of those two is correct? If it's the first one, then there is a setting that is likely wrong. If it is the latter, then we need to know a bit more about how the textbox is filled in, and probably something more than that, but that's a good place to start.

    There's also a bit of a question as to which version of VB this is, but you posted in the VB6 forum, so we'll assume that it belongs here until shown otherwise.
    My usual boring signature: Nothing

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,273

    Re: Text boxes that allow user input

    Is it possible you are using a Label instead of a TextBox?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2019
    Posts
    4

    Re: Text boxes that allow user input

    I have VB 6.0 but it is the Learning Edition. (I took a class a the local community college and got this version for the class). Let me check the properties on the text boxes I have and I'll reply. Thanks for commenting.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2019
    Posts
    4

    Re: Text boxes that allow user input

    No, I'm using a text box.

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2019
    Posts
    4

    Re: Text boxes that allow user input

    I created two forms both with text boxes and buttons coded to unload the current form and show the other form. I am able to enter data into the text boxes in real time but the data is not saved.

  7. #7
    Hyperactive Member
    Join Date
    Feb 2017
    Posts
    409

    Re: Text boxes that allow user input

    I am able to enter data into the text boxes in real time but the data is not saved.
    This is by design. When you exit the program or shut off the computer memory is cleared.
    Part of programming is learning how to code to save the data.
    For example you can use various methods such as a flat file, database , other methods.
    In your case -- both program wise and where you're at now, I would use a flat file
    and the sequential method. Search the forum for saving files or sequential and I'm
    sure you will find a number of examples.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width